/*
 Navicat Premium Data Transfer

 Source Server         : .
 Source Server Type    : MariaDB
 Source Server Version : 100313
 Source Host           : localhost:3306
 Source Schema         : imooc-news-dev

 Target Server Type    : MariaDB
 Target Server Version : 100313
 File Encoding         : 65001

 Date: 17/08/2020 22:20:12
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin_user
-- ----------------------------
DROP TABLE IF EXISTS `admin_user`;
CREATE TABLE `admin_user` (
  `id` varchar(24) NOT NULL,
  `username` varchar(32) NOT NULL COMMENT '用户名',
  `password` varchar(64) DEFAULT NULL COMMENT '密码',
  `face_id` varchar(64) DEFAULT NULL COMMENT '人脸入库图片信息，该信息保存到mongoDB的gridFS中',
  `admin_name` varchar(12) DEFAULT NULL COMMENT '管理人员的姓名',
  `created_time` datetime NOT NULL COMMENT '创建时间 创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间 更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运营管理平台的admin级别用户';

-- ----------------------------
-- Records of admin_user
-- ----------------------------
BEGIN;
INSERT INTO `admin_user` VALUES ('1001', 'admin', '$2a$10$c8Eh/a7NAwtOLOs/S4Kd9ufGaTFzBszfOuaRDhc09nl59HQWBNjpG', NULL, 'admin', '2020-07-09 11:33:39', '2020-07-09 11:33:44');
INSERT INTO `admin_user` VALUES ('2007108YW09A83XP', 'admin123', '$2a$10$suFDBoqVShfhZ/aX8DFmf.PT.CkkI2scdLhFIlnL8DsL5G1Q/kxAK', NULL, 'admin', '2020-07-10 12:33:12', '2020-07-10 12:33:12');
INSERT INTO `admin_user` VALUES ('2007108ZNW11MNC0', '123', '$2a$10$6X3FvX7KaNposqpR8T.SJetHste4Yvz4limgIENrrgzKWo95.WGlC', NULL, '4213', '2020-07-10 12:35:45', '2020-07-10 12:35:45');
INSERT INTO `admin_user` VALUES ('200710A9FA5W54ZC', 'test123', '$2a$10$fKu4V3V77V9XoAdDSjFZL.pU/CxlEa8ZtFQG5sqpEfD0WwruybLj6', NULL, 'test', '2020-07-10 14:29:15', '2020-07-10 14:29:15');
INSERT INTO `admin_user` VALUES ('20071489GSMHCZ2W', 'admin456', NULL, '5f0d295ce1d10e485d7f2d62', 'admin', '2020-07-14 11:41:16', '2020-07-14 11:41:16');
COMMIT;

-- ----------------------------
-- Table structure for app_user
-- ----------------------------
DROP TABLE IF EXISTS `app_user`;
CREATE TABLE `app_user` (
  `id` varchar(24) NOT NULL,
  `mobile` varchar(32) NOT NULL COMMENT '手机号',
  `nickname` varchar(16) NOT NULL COMMENT '昵称，媒体号',
  `face` varchar(128) NOT NULL COMMENT '头像',
  `realname` varchar(128) DEFAULT NULL COMMENT '真实姓名',
  `email` varchar(32) DEFAULT NULL COMMENT '邮箱地址',
  `sex` int(11) DEFAULT NULL COMMENT '性别 1:男  0:女  2:保密',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `province` varchar(32) DEFAULT NULL COMMENT '省份',
  `city` varchar(32) DEFAULT NULL COMMENT '城市',
  `district` varchar(32) DEFAULT NULL COMMENT '区县',
  `active_status` int(255) NOT NULL DEFAULT 0 COMMENT '用户状态：0：未激活。 1：已激活：基本信息是否完善，真实姓名，邮箱地址，性别，生日，住址等，如果没有完善，则用户不能在作家中心操作，不能关注。2：已冻结。',
  `total_income` int(255) NOT NULL DEFAULT 0 COMMENT '累计已结算的收入金额，也就是已经打款的金额，每次打款后再此累加',
  `created_time` datetime NOT NULL COMMENT '创建时间 创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间 更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `mobile` (`mobile`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网站用户';

-- ----------------------------
-- Records of app_user
-- ----------------------------
BEGIN;
INSERT INTO `app_user` VALUES ('1001', '13963118693', '慕小建', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕小建', 'aaa@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1002', '12961884841', '慕大大', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕大大', 'rtrt@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 1, 0, '2020-05-16 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1003', '10961884811', '慕天天', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕天天', 'vvff@imooc.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-05-06 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1004', '11961886923', '慕皮皮', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕皮皮', 'yuyu@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1005', '13961886845', '慕文文', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕文文', 'adad@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1006', '11961886778', '慕笑笑', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕笑笑', '123@163.com', 0, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1007', '19961886449', '慕淘淘', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕淘淘', '234@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1008', '13961881432', '慕包包', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕包包', 'ddd@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1009', '13961881132', '慕宝宝', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕宝宝', 'bbb@163.com', 0, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1010', '16961186932', '慕玉玉', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕玉玉', 'vvv@163.com', 0, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1012', '12363118691', '慕品凭', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕品凭', 'imooc@163.com', 0, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('1013', '12963118693', '慕论文', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/200412A6A3DSZ0X4/200412A6A3DSZ0X4.png', '慕论文', 'test@163.com', 1, '2020-04-15', '江苏', '南京市', '雨花台区', 2, 0, '2020-04-12 14:19:48', '2020-04-19 11:18:05');
INSERT INTO `app_user` VALUES ('2006289KKADB4H94', '123456', '用户：1****6', 'http://122.152.205.72:88/group1/M00/00/05/CpoxxFw_8_qAIlFXAAAcIhVPdSg994.png', NULL, NULL, 2, '1900-01-01', NULL, NULL, NULL, 1, 0, '2020-06-28 13:29:32', '2020-06-28 13:29:32');
INSERT INTO `app_user` VALUES ('200628AFYM7AGWPH', '456789', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '真实小慕', 'imooc@imooc.com', 1, '1998-03-14', '北京', '北京市', '东城区', 1, 0, '2020-06-28 14:45:35', '2020-07-08 12:30:22');
COMMIT;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
  `id` varchar(24) NOT NULL,
  `title` varchar(64) NOT NULL COMMENT '文章标题',
  `content` longtext NOT NULL COMMENT '文章内容，长度不超过9999，需要在前后端判断',
  `category_id` int(2) NOT NULL COMMENT '文章所属分类id',
  `article_type` int(1) NOT NULL COMMENT '文章类型，1：图文（1张封面），2：纯文字',
  `article_cover` varchar(256) DEFAULT NULL COMMENT '文章封面图，article_type=1 的时候展示',
  `is_appoint` int(1) NOT NULL COMMENT '是否是预约定时发布的文章，1：预约（定时）发布，0：即时发布    在预约时间到点的时候，把1改为0，则发布',
  `article_status` int(1) NOT NULL COMMENT '文章状态，1：审核中（用户已提交），2：机审结束，等待人工审核，3：审核通过（已发布），4：审核未通过；5：文章撤回（已发布的情况下才能撤回和删除）',
  `publish_user_id` varchar(24) NOT NULL COMMENT '发布者用户id',
  `publish_time` datetime NOT NULL COMMENT '文章发布时间（也是预约发布的时间）',
  `read_counts` int(11) NOT NULL DEFAULT 0 COMMENT '用户累计点击阅读数（喜欢数）（点赞） - 放redis',
  `comment_counts` int(11) NOT NULL DEFAULT 0 COMMENT '文章评论总数。评论防刷，距离上次评论需要间隔时间控制几秒',
  `mongo_file_id` varchar(64) DEFAULT NULL,
  `is_delete` int(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除状态，非物理删除，1：删除，0：未删除',
  `create_time` datetime NOT NULL COMMENT '文章的创建时间',
  `update_time` datetime NOT NULL COMMENT '文章的修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章资讯表';

-- ----------------------------
-- Records of article
-- ----------------------------
BEGIN;
INSERT INTO `article` VALUES ('2006116Y18X1Z7R4', '非HTTP状态下开启web视频的临时方案', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">新版本的chrome在调用摄像头的时候，会有安全警告，所以调用摄像头的js方法就无法使用了，如下：<br><img src=\"https://img2020.cnblogs.com/blog/841496/202004/841496-20200419125708474-938365685.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1604px;\"><br>意思是保证安全，你要在HTTPS的情况下，才能调用浏览器摄像头。但是我们平时开发的时候，本地环境往往没有HTTPS，如何解决呢？</p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">禁用浏览器默认安全模式</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">复制如下命令到浏览器的地址栏：<br>chrome://flags/#unsafely-treat-insecure-origin-as-secure<br>如下图，找到黄色部分，然后enabled开启，并且把你自己本地模拟的域名放进去，如此就增加了白名单。设置好需要重启浏览器。<br><img src=\"https://img2020.cnblogs.com/blog/841496/202004/841496-20200419125708515-1228597209.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1213px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">回到浏览器测试视频，结果OK，如下：<br><img src=\"https://img2020.cnblogs.com/blog/841496/202004/841496-20200419125708514-476076915.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 928px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">电脑上的绿色点表示摄像头打开。<br><img src=\"https://img2020.cnblogs.com/blog/841496/202004/841496-20200419125708494-1849803821.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 492px;\"></p>', 2, 2, '', 0, 4, '200628AFYM7AGWPH', '2020-06-11 09:42:37', 0, 0, NULL, 0, '2020-06-11 09:42:37', '2020-06-11 09:42:37');
INSERT INTO `article` VALUES ('2006116Z3MAP8SW0', '慕课网GEO地理位置直播视频与文字版记录', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><br class=\"Apple-interchange-newline\">视频已经由慕课网上传至B站，免费高清，地址为：<a href=\"https://www.bilibili.com/video/BV1Lz411b7cN%E3%80%82%E4%BB%A5%E4%B8%8B%E9%83%BD%E6%98%AF%E6%96%87%E5%AD%97%E7%89%88%E7%AC%94%E8%AE%B0%E3%80%82\" style=\"color: rgb(70, 70, 70);\">https://www.bilibili.com/video/BV1Lz411b7cN。以下都是文字版笔记。</a></p><h2 id=\"toc_1\" style=\"font-size: 21px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">《Elasticsearch极速入门与基于百度地图的geo地理位置搜索》</h2><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">1. es介绍</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><code>互动</code>：什么是搜索：</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">百度谷歌，都是搜索引擎。</li><li style=\"list-style-type: circle;\">垂直搜索，站内，比如淘宝京东站内搜索商品。</li></ul></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">什么是ES：<br>Elasticsearch 是一个分布式可扩展的实时搜索和分析引擎，底层基于lucene。</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">可以存储文档，用于海量数据检索</li><li style=\"list-style-type: circle;\">可以近实时的分析数据</li><li style=\"list-style-type: circle;\">可扩展性（几百个节点甚至上千）相当强大。</li><li style=\"list-style-type: circle;\">结合ELK，实现日志收集<code>（架构师课程里有）</code></li><li style=\"list-style-type: circle;\">地理位置geo信息搜索与监控和分析（常用于社交平台，物流快递，地图等场景）</li></ul></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><code>可以互动</code>：为什么要使用es</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\"><code>如果用普通数据库，单表可以存多少数据比较合适？这个主要看自己自身业务，一般来说，1000万左右，但是6-700万的样子就可以开始逐步计划做数据库优化分库分表等</code>。普通搜索基于数据库，数据库单表存储能力有限，数据量越多，搜索性能越低下</li><li style=\"list-style-type: circle;\">数据库支持模糊搜索，全表扫描遍历（es基于倒排索引，根据词汇直接把对应的文档id搜索到然后把对应的数据查询出来），不支持高亮搜索<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">我在慕课网这个网站搜索<code>spring 短视频</code></li><li style=\"list-style-type: circle;\">词条：spring 短视频</li><li style=\"list-style-type: circle;\">数据库不支持分词搜索，es（搜索引擎）支持</li><li style=\"list-style-type: circle;\">db搜索不如专业的搜索引擎靠谱</li></ul></li></ul></li></ul><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">简单聊一聊倒排索引</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15833935162304.jpg\" alt=\"-w760\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><h3 id=\"toc_4\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">2. es的核心术语与数据结构</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">核心术语<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">ES --&gt; 数据库（1）</li><li style=\"list-style-type: circle;\">索引index --&gt; 表（2）</li><li style=\"list-style-type: circle;\">文档 document --&gt; 行（记录）（3）</li><li style=\"list-style-type: circle;\">字段 fields --&gt; 列（4）</li><li style=\"list-style-type: circle;\"><del>类型type</del>&nbsp;过期，也能作为表&nbsp;<img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15830320950982.jpg\" alt=\"-w619\" style=\"height: auto; max-width: 100%;\"><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15830321329817.jpg\" alt=\"-w385\" style=\"height: auto; max-width: 100%;\"></li></ul></li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15830321681137.jpg\" alt=\"-w1276\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">数据结构，数据库表记录，对应es：&nbsp;<img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15830323628199.jpg\" alt=\"-w451\" style=\"height: auto; max-width: 100%;\"></li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><br></p><h3 id=\"toc_5\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">3. es和head插件安装见慕课网手记</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><a href=\"https://github.com/mobz/elasticsearch-head#running-with-built-in-server\" style=\"color: rgb(70, 70, 70);\">https://github.com/mobz/elasticsearch-head#running-with-built-in-server</a></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><a href=\"https://www.imooc.com/article/286936\" style=\"color: rgb(70, 70, 70);\">https://www.imooc.com/article/286936</a><br>这个基于centos6，架构师课程基于centos7</p><h3 id=\"toc_6\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">4. head插件，索引index创建与映射mappings创建</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">索引名: friends<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15830449480378.jpg\" alt=\"-w616\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><h3 id=\"toc_7\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">分片与集群，健康度</h3><h6 id=\"toc_8\" style=\"font-size: 11px; font-weight: bold; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">*简称（附）</h6><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">shard = primary shard（主分片）<br>replica = replica shard（副本分片）</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">演示使用head来进行索引的创建</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">主分片（shard）：把索引库拆分为多份，分别放在不同的节点上，比如有3个节点，3个节点的所有数据内容加在一起是一个完整的索引库。分别保存到三个节点上，目的为了水平扩展，提高吞吐量。也可以做到故障转移。ES自动管理和组织分片, 并在必要的时候对分片数据进行再平衡分配, 所以用户基本上无需担心分片的相关处理细节</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">副本分片（replica）：每个shard的备份。也可以称之为副本，ES默认为一个索引创建5个主分片, 并分别为其创建一个副本分片。意思就是说每个索引都由5个主分片（shard）形成，而每个主分片都相应的有一个备份（replica）。</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">分片机制<br>每个索引可以被分片，就相当于吃披萨的时候被切了好几块，然后分给不同的人吃，如下图所示：<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/04/03/15760315077964.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">索引my_doc只有一个主分片；</li><li style=\"list-style-type: circle;\">索引shop有3个主分片；</li><li style=\"list-style-type: circle;\">索引shop2有5个主分片。</li><li style=\"list-style-type: circle;\">每个主分片都包含索引的数据，由于目前是单机，所以副本分片是没有的，这个时候集群健康值显示为黄色。</li><li style=\"list-style-type: circle;\">副本分片是主分片的备份，主挂了，备份还是可以访问，这就需要用到集群了。</li><li style=\"list-style-type: circle;\">同一个分片的主与副本是不会放在同一个服务器里的，因为一旦宕机，这个分片就没了</li><li style=\"list-style-type: circle;\">我不知道大家有没有玩过nas，这个数据存储有点像raid机制。</li></ul></li></ul><h3 id=\"toc_9\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">es 健康度</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">不同的颜色表示es不同的健康程度</p><ol style=\"padding-left: 40px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: decimal;\">绿色：集群健康，所有主分片和副本分片都是可用状态。</li><li style=\"list-style-type: decimal;\">黄色：亚健康，所有的主分片可用，但是副本分片部分不可用。</li><li style=\"list-style-type: decimal;\">红色：不健康，主分片部分不可用。</li></ol>', 3, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006116YD8XX92A8.png', 0, 3, '1001', '2020-06-11 09:45:52', 0, 0, NULL, 0, '2020-06-11 09:45:52', '2020-06-11 09:45:52');
INSERT INTO `article` VALUES ('2006116ZH9536PBC', '[涨姿势]Chrome 谷歌浏览器原生截长图命令', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">截长图技能GET</h3><ol style=\"padding-left: 40px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">按<code>F12</code>，拉出控制台<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200326150153376-754832260.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1869px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><code>commond</code>&nbsp;+&nbsp;<code>shift</code>&nbsp;+&nbsp;<code>p</code>，拉出命令行<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200326150153319-1762053761.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 827px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">然后搜索&nbsp;<code>CAP</code>&nbsp;开头的，就是CAP定里那个CAP，点击红框中的，就能截取长图了，这样有时候在和产品交流或者给老板图解的时候回很方便的哈<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200326150153325-431421744.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 750px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">最终效果</p></li></ol><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/26/blogitzixicomp47.png\" alt=\"\" width=\"3744\" height=\"12230\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006116ZGT56FX8H.jpeg', 0, 3, '200628AFYM7AGWPH', '2020-06-11 09:47:14', 0, 0, NULL, 0, '2020-06-11 09:47:14', '2020-06-11 09:47:14');
INSERT INTO `article` VALUES ('2006116ZRZXPP46W', '人人都要关注的分布式系统中的CAP理论', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">分布式系统</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">相信大家看过我的文章或者视频的，都应该知道什么是分布式系统，分布式系统就是一个系统由多个组成部分共同构成，用户的一个请求可能会经过多个不同的计算机节点之后，通过运算才会把结果响应给用户，那么这个请求所经过的不同的几个系统就是分布式系统。对于用户来讲，你是不是分布式系统，对他来讲是透明的。参考如下图：<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162405888-162860738.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 520px;\"><br>图中就表示一个用户在经历下单过程会经过多个系统，他们是分布式的，共同组成一个整体。</p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">CAP 概念</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">在分布式系统中，必定会遇到CAP，如下：</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">C（Consistency）：一致性</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">在分布式系统中，所有的计算机节点的数据在同一时刻都是相同的，数据都是一致的。不能因为分布式导致不同系统拿到的数据不一致。也就是说，用户在某一个节点写了数据，在其他节点获得该数据的值是最新的；如若是更新操作，那么所有用户看到的也是更新后的新的值，不论哪个节点，不论集群，不论主备，获得的数据都是相同的。<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">如下图：共有5个节点，往A节点去写，那么其他节点的数据在同一时间都是相同的，其他用户读取的时候也都是相同的，数据的一致性很强。&nbsp;<img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162406004-1393849029.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; width: 589px;\"></li></ul></li></ul></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">A（Availability）：可用性</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">保证你的系统可用，也就是说无论任何时候，系统都可以被用户访问到，用户可以获得正常的响应结果。比如做好集群啊，做好主备啊等等，这个就是高可用。<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">如下图：集群是一个整体，不论是否有节点宕机，那么作为整体，他还是可以继续对外提供服务的，保证了系统的可用性。&nbsp;<img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162406003-413537287.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; width: 585px;\"></li></ul></li></ul></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">P（Partition tolerance）：分区容错性</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">在整个分布式系统中，我们都是部署在不同的节点上，或者是不同的机房甚至是不同的地域，部署的时候会有一些子网，某一些服务会部署在不同的子网，每个子网就是一个区，也就是网络分区，分区和分区之间的通信也有可能出现通信故障。某个节点或者网络或者地域（分区）出现问题，整体整个系统还是照样能够提供一致性和可用性的服务。也就是说部分系统故障不会影响整体。为什么会这样，主要是因为有程序bug，计算机硬件问题，网络问题，网线被挖断了等等造成的综合因素。所以呢，我们的诉求就是即使小部分出问题，也要保全整体。并且对于任何分布式系统来讲，都需要去考虑分区容错的问题。</li><li style=\"list-style-type: circle;\">附，以腾讯云为例，图中就有两处不同分区，第一个是在上海这个地域有不同的区域，不同区域通信走公网，可能有通信故障。其次就是私有网络，也就是子网络，他可以创建很多个，自己去定义不同的网段ip。&nbsp;<img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162406015-1209826804.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; width: 458px;\"></li></ul></li></ul><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">CAP 无法同时满足</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">如果从理论上来讲，以上三点C/A/P都应该满足吧，但是系统是人开发的，那肯定会或多或少有各种各样的问题。在分布式系统中同时满足这三点是不可能的。所以对于CAP来讲，只能满足其中两者，要么AP，要么CP，要么CA。如下图：<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162406064-653267897.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 589px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">为什么会这样呢？我们举一个例子，来看一下CAP能不能同时满足，如下图：<br><img src=\"https://img2020.cnblogs.com/blog/841496/202003/841496-20200323162406021-707701808.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 622px;\"><br>上图中，ABCDE这5个节点都是分别部署在不同地域的机房的节点，假设现在我们的分区容错性P做的很好，保证不会出现网络方面的故障，这个时候我们来看一下一致性C和可用性A。现在有一个请求把数据写入到了A节点，随后用户的下一个请求要访问B节点，那么由于他们之间在不同的地域，数据同步需要有时间延迟，可能几百毫秒可能1-2秒。那么读请求要请求到一致的数据，就会被阻塞，阻塞的时候当前这个系统就不可用了，因为数据同步需要时间，所以此时的可用性A就无法满足，只能满足CP；那么再来看，假设要满足系统可用性，那么请求读到的数据，在节点同步的过程中就会是一个老的数据，数据就不能达到一致性C，所以这个时候就是AP。OK不？那么我们平时开发系统倒是在C和A之间取其一来搭配P的</p><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">组合搭配</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么 CP,AP,CA，这三种，哪个好呢？</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">CP：满足一致性和分区容错的系统，性能不会很高，因为一致性是时时保持的。就比如说我提交一个订单，这个订单的数据要同步到各个系统，保证强一致性。那么这样用户请求大多都会被阻塞。需要耗时等待。redis，mongodb，hbase都是CP。（redis集群如果一个主节点挂了，那么slave成为master，他会有一个时间段导致不可用，A不满足）</li><li style=\"list-style-type: disc;\">CA：满足一致性，满足可用性，一般来说都是以单体存在的集群架构，可扩展性不高。一般都是关系型数据库。</li><li style=\"list-style-type: disc;\"><code>AP</code>：满足可用性和分区容错，那么这样就不是一致性了，往往会采用弱一致性，或者最终一致性。这也是通常用的最多的。 我们平时开发的系统就是以AP来展开工作的。</li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">对于我们平时开发的时候，<code>分区容错P</code>是一定要满足的，因为我们在部署的时候往往都都是多节点集群部署，设置异地互备，比如北京机房和机房都提供服务 ，所以，一定要容错。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么接下来我们要抉择<code>一致性</code>还是<code>可用性</code>呢？<br>一般来说，往往我们在大家网站架构的时候，我们都会采用AP，主流的互联网公司也是如此，也就是数据的弱一致性，因为要保证系统的整体的高可用性以及容错性。啥叫弱一致性，比如我们经常看头条，头条的点赞数评论数或者微博粉丝数，具体的数值每个人浏览的时候可能不一样，这个其实无所谓的，这就是弱一致性。而像Redis啊MongoDB这样的中间件，是CP，也就是要保证数据的一致性，因为毕竟要为网站提供数据服务的，一致性必须满足。</p><h3 id=\"toc_4\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">关于弱一致性</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其实现在的互联网环境里，很多项目都不会采用强一致性，因为很难做，而往往采用弱一致性，因为用户可以接受。比如双11或者618的时候，订单蹭蹭蹭的海量增加，我们只需要关注订单下单成功就行，具体多少订单，具体多少金额，我们不会去实时的统计计算的，因为没必要，会在高峰期过后逐步去统计，慢慢的实现一致性。那么这个就是目前主流的做法。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">但是一定要注意，数据层面的交互，关系型数据库，redis，mongodb等，他们肯定是强一致性，因为需要提供给你的网站数据服务。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其实呢，我们在互联网环境里，往往会采用BASE理论，<br>Base = Basically Available Soft-state Eventually-Consistent<br>也就是达到基本可用软状态的最终一致性。它是比较平衡了CAP后得到的结论，这也是绝大多数互联网系统实践后的一个结果，他主要的核心思想就是忽略强一致性，使用弱一致性来达到最终一致。</p>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006116ZRN0S5494.png', 0, 3, '1001', '2020-06-11 09:47:50', 0, 0, NULL, 0, '2020-06-11 09:47:50', '2020-06-11 09:47:50');
INSERT INTO `article` VALUES ('2006117034WDKR8H', '疫情风险下的项目管理与紧急预案策略', '<h3 style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">相信大家都经历了疫情，在疫情之下，企业推迟复工，多地封城封路，各行各业都收到了冲击，甚至很多企业都因此倒闭，那么在企业项目管理中，有一点我们需要把控的就是风险管理，遇到风险如何更好的去调控，把损失降低。<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843495928674.jpg\" alt=\"-w677\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">作为项目经理，应该如何面对，如何处理，如何协调资源，这些都是作为一名PM所需要去考虑的。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">当各个企业收到延长春节并延迟复工的消息以后，很多企业的项目都停止了，无法正常运作，尤其是一些传统企业收到的打击最大，比如线下物流，工厂等，而互联网企业相对好一些，项目都是在线的，而且大家可以在家远程办公就能整合到一起。（像我们的线下物流就完全停了，对接的工厂端也完全停了，工厂停了，环境监测系统也用不着了，一连串的连带效应）<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496113076.jpg\" alt=\"-w638\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其实不论线上还是线下，项目进度肯定会延期，资源成本提升，这么一来很多项目都是亏本的，甚至还会因为合同而赔钱。那么这个时候项目就应该不能按照原计划进行，而需要适当进行变更，因为这是外部的不可抗力的因素。项目经理首先最要考虑的就是干系人管理，尤其是你的客户，管理客户，打好招呼，伺候好，维护好现有关系，那么项目上的后续事宜可以更好的开展。</p><h3 style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\"><a name=\"toc_1\" style=\"color: rgb(70, 70, 70);\"></a>认清风险</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">一般项目初期在规划项目编撰合同的时候，相关的风险都应该去有所考虑以及有应对的预案，举几个最简单的例子：</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">项目开展过程中人员流动或者疾病风险<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">招储备人员（外包公司叫做on bench）</li><li style=\"list-style-type: circle;\">激励政策，也就是TeamBuilding，团队融洽度，每月一次TB，每季度一次项目分红（我们是1500/人）</li></ul></li><li style=\"list-style-type: disc;\">服务器/硬件设备风险<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">自建机房要有容灾预案</li><li style=\"list-style-type: circle;\">云服务器要有多地主备</li></ul></li><li style=\"list-style-type: disc;\">成本风险<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">项目中涉及到的采购供应，成本管理需要做好，预算多少，会否超支，有没有可能因为投入越来越多而导致项目亏损，或者盈利不多，需要提前规划和准备。</li></ul></li><li style=\"list-style-type: disc;\">第三方风险<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">一个项目中可能会有20%-40%甚至更多的内容会外包给第三方公司，第三方有没有可能跑路？资质够不够？可以多找几家对比，或者额外找一家做备胎。又或者找两三家一起合作，不把鸡蛋放在一个篮子里。并且要定期验收，定期检查质量。&nbsp;<img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496291926.jpg\" alt=\"-w911\" style=\"height: auto; max-width: 100%;\"></li></ul></li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么像这次疫情，不能归类为普通的风险，应该定性为<code>不可抗力风险</code>，因为你预测不到，而且有时候政府的一个突发性政策就会导致项目无法进行（比如我们的物流项目，和政策息息相关，所以我们很多高层每个季度都要去相关部门参加各种培训，甚至一些资质认证的考试。从而伪实时的跟着政策走）。所以应该纳入免责条款，所以合同里应该要写清，如果不写清除，会有后期的各种纠纷。就比如你公司被人炸了，被陨石击中了，这些都是外部的不可抗力，一般人还真遇不到。像N年前，有个哥们车子被陨石击中，保险公司不赔，为啥，因为这是不可抗力因素呀！<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496433035.jpg\" alt=\"-w799\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">如果是平时的风险，一般来说PM或者PMO能去把控或者承担风险责任，但是想这次疫情对所有企业的袭击，就会上升到企业层面，由企业来承当整个公司的风险后果，所有高层都应该出来协调各方项目资源、项目整合、与项目管理。为什么要这么做，这个其实就是统一整合式管理，因为所有的项目全部受影响，就需要统一的整合了，保证一致性。<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496546451.jpg\" alt=\"-w764\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><h3 style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\"><a name=\"toc_2\" style=\"color: rgb(70, 70, 70);\"></a>审查风险</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">分析在这次风险中的各个环节，对比原有计划所存在的出入点。比如：</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">特殊物流运输会减少流量<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">工厂需求减少</li><li style=\"list-style-type: circle;\">大型物流车停滞所产生的消耗费（一天不开车，每辆亏损上千）</li></ul></li><li style=\"list-style-type: disc;\">交通管制导致原有特殊导航系统不可用，油费额外增多</li><li style=\"list-style-type: disc;\">员工需要自我14天隔离的费用</li><li style=\"list-style-type: disc;\">每日口罩成本损耗</li><li style=\"list-style-type: disc;\">远程办公可能会带来的额外成本<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">微信视频会议等都免费</li><li style=\"list-style-type: circle;\">国外的一些团队协作工具收费&nbsp;<img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496657408.jpg\" alt=\"-w600\" style=\"height: auto; max-width: 100%;\"></li></ul></li></ul><h3 style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\"><a name=\"toc_3\" style=\"color: rgb(70, 70, 70);\"></a>应对风险</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">不管遇到任何风险，第一个要做的就是上报，注意，不要越级上报，你是PM，你上面有PMO，所要先汇报给PMO，如果没有PMO就汇报给你的直属经理，比如部门经理或者部门总监。在这个过程中，要响应政府号召，比如排查啊隔离啥的，每日体温测量，人员动向，如果有异常情况，也要及时上报。那么作为项目经理，就需要根据实际情况来适当调整原项目进度计划，适当延后，和参与的相关干系人讨论方案，与客户协调沟通。<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496759816.jpg\" alt=\"-w701\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">随后，你要看风险是否可控，是否可以规避，常规的你的下属要离职，那么你就去谈谈，能不能挽留，能不能协调公司资源给他涨薪，了解其诉求，解决其诉求。如果是一些额外成本费用，那么可能还是需要通过上报批准，当然如果小成本你要自己解决也行。像这次疫情，对于一些不可继续的项目，只能停止复工，往后延期延迟，硬着头皮偷偷上一旦被查会承担一些法律责任。比如我们有很多车队因为交通管制无法上路，每天每辆车的停车费用有很多，需要和司机和管理处协调，谈判能否降低停车成本，降低企业成本。<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843496892846.jpg\" alt=\"-w679\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第三，转移风险，降低风险影响，一般来说就是弥补，最常见的就是保险业务。我们每辆车都投了巨大的保额，为啥？因为全国这么多车，一旦发生车祸，人员伤亡，你都处理不过来，这个时候就需要有保险的介入，以此把风险转移给保险公司，以最小的时间人力成本来降低风险。那么对于这次疫情，作为PM，需要回顾一下所有的实体资源，看看是否有一些保险可以弥补一定的损失。我们审查以后，对于司机的健康保险是可以有一定的弥补的，有总比没有好。<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843497052573.jpg\" alt=\"-w603\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第四，主动降低风险，这个其实很简单，就是响应号召，戴口罩，少出门，勤洗手，多消毒，降低自身感染病毒的风险。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第五，接受风险，这个分为主动和被动之分：</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">主动：实行远程办公，线上的一些项目都可以采取这种方式，互联网企业是较多的，还有一些自媒体啥的，这些完全可以在家里办公，而且可以利用远程协作工具来开展团队管理。但是也要注意，PM要每天定时跟踪每位团队成员的健康度，比如测量体温，观察身体异常。</li><li style=\"list-style-type: disc;\">被动：这个就没办法了，线下的传统企业几乎都栽进去了，我们必须响应号召，延迟复工，工厂不得开，要开也要得报备审查。如果不行只能停止运作。&nbsp;<img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15843497175683.jpg\" alt=\"-w683\" style=\"height: auto; max-width: 100%;\"></li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第六，要提交应急风险变更通知，因为项目整体肯定会受到影响，所以原计划是肯定要做出变动的，比如最大的成本开支，以及预算，都要跟着市场资源做变动，变动了才能有效调控。如果资源没有，或者成本实在太高，影响项目利润，那么就只能暂缓延迟。</p>', 5, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117016KH49D4.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 09:48:49', 0, 0, NULL, 0, '2020-06-11 09:48:49', '2020-06-11 09:48:49');
INSERT INTO `article` VALUES ('200611716SZ4Z9AW', 'Hystrix 简单聊聊断路器/熔断器', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">什么是Hystrix</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">Hystrix 在SpringCloud中负责服务熔断服务降级的作用。<br>Hystrix 存在的目的也是为了防止过多超时导致系统瘫痪。比如多个服务之间的相互调用，如下图：<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15825246907695.jpg\" alt=\"-w757\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><blockquote style=\"background-image: none; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-color: rgb(239, 239, 239); border-image: initial; padding: 5px 10px; margin-top: 10px; margin-bottom: 10px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><p style=\"margin: 10px auto; line-height: 24px;\">订单-&gt;商品-&gt;积分-&gt;日志<br>订单-&gt;支付-&gt;日志<br>商品-&gt;风控-&gt;日志<br>服务之间相互调用，假设某个链路上的某个服务比如日志服务超时了，不可被调用，那么其他的服务全部卡死，导致崩溃。</p></blockquote><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">举一个生活中的例子：<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15825253794270.jpg\" alt=\"-w767\" style=\"height: auto; max-width: 100%; margin: 10px;\"><br>在家里，我开了很多电器，这个时候如果没有一个保护装置的话，由于某个电器过载，最终会导致整个电路断掉，那么每户人家肯定会有一个装置叫做<code>保险丝</code>，那么Hystrix断路器就起到了保险丝的作用，他可以保护整个系统。<br>Hystrix在分布式系统或者微服务中，一旦出现了超时或者依赖服务不可用调用失败异常等情况，他能够保证整个系统不会整体宕机崩溃，从而提高整个系统的健壮性。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">Hystrix的原理就是当某一个服务发生故障的时候，这个时候是不会有任何的正常响应的，但是通过Hystrix可以返回一个备用响应，也就是所谓的backup，如此一来，发生异常的系统就不会造成不必要的超时等异常现象，这就好比打篮球，上场必须要5人，但是如果有人受伤要下场，这个时候就必须要有backup球员，如果没有，这个球队很难进行比赛了。</p><blockquote style=\"background-image: none; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-color: rgb(239, 239, 239); border-image: initial; padding: 5px 10px; margin-top: 10px; margin-bottom: 10px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><p style=\"margin: 10px auto; line-height: 24px;\">简单一句话总结，就是Hystrix可以保证在众多微服务中一个服务出现了问题不会引发整体系统奔溃的一个开源组件。</p></blockquote><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">服务熔断</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">熔断是一种微服务链路的保护机制，当某个服务（依赖）不可用/宕机/超时/异常的时候，会进行服务的熔断（是一个开关，会开启），这个发生故障的节点就被<code>熔断了</code>也就是不可用，不会再让用户调用到，那么此时就需要降级，来直接会返回一个错误的异常响应信息。当这个节点OK恢复了，hystrix会检测到，然后再把他恢复到整个链路。</p><blockquote style=\"background-image: none; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-color: rgb(239, 239, 239); border-image: initial; padding: 5px 10px; margin-top: 10px; margin-bottom: 10px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><p style=\"margin: 10px auto; line-height: 24px;\">熔断机制在很多行业里都有，比如股市，金融行业，都是为了更好更有效的控制，把损失控制在一定的范围内。</p></blockquote><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">代码演示</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">pom 中加入依赖</li></ul><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs xml\">\n</code></pre><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">启动类开启熔断器</li></ul><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs less\"><span class=\"hljs-variable\" style=\"color: rgb(0, 128, 0);\">@EnableCircuitBreaker</span>\n</code></pre><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">编写错误的controller</li></ul><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">测试：</p><ol style=\"padding-left: 40px;\"><li style=\"list-style-type: disc;\">如果正常访问，显示&nbsp;<code>Hello hystrix~</code></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">发生异常熔断，则展示：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15825390038380.jpg\" alt=\"-w416\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li></ol></li></ul><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">服务器降级</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">当某个服务资源不够的时候，可以启用降级处理。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">举一个例子，如下图：<br><img src=\"https://lee-blog.oss-cn-shanghai.aliyuncs.com/2020/03/16/15827022515247.jpg\" alt=\"-w724\" style=\"height: auto; max-width: 100%; margin: 10px;\"><br>假设我们家里用很多电器，其他电器正在使用中并且占用的电流啊电压啥的很大，空调我这个时候可以不用，把资源给到其他的电器，这时我们是直接把空调插头拔出，区别于熔断，熔断的话是发生异常后和谐的响应信息，而降级是我把这个服务关停了，随后在响应给用户。需要注意，由于服务关闭了，所以响应是发生在调用方的，也就是客户端，比如图中的<code>电热水壶</code>和<code>微波炉</code>。当电压电流恢复后，我们再把空调插头插上即可，那么这就是降级的一种方式。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么熔断和降级的异同点是啥呢？</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">相同点：<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">都是为了提升系统的可靠性</li><li style=\"list-style-type: circle;\">都为了正确的返回响应给用户</li></ul></li><li style=\"list-style-type: disc;\">不同点：<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">熔断：被调用的服务方（下游）发生故障导致</li><li style=\"list-style-type: circle;\">降级：全局整体服务负载过高，有效调动资源服务，由调用方（上游）控制</li></ul></li></ul><h3 id=\"toc_4\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">熔断解耦分离</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">当使用<code>@HystrixCommand</code>的时候，每有一个controller的接口api，就会有一个熔断方法，这是成倍的增长的，数量会很多，维护不方便，所以需要解耦开来。而且，当我们关闭不用的微服务时，上游还是会调用下游，所以我们需要在上游服务这块，去增加降级的方法，如果服务无法调用，则调用上游服务中的降级方法即可。并且下游服务如果被我们关闭，上游的调用还是可以有响应给用户的。</p><h3 id=\"toc_5\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">简单总结一下</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">熔断：当一个服务发生故障异常，这个时候熔断当前整个服务，把这个服务变的不可被访问，而不是客户端请求这个服务的时候一直处于超时。<br>降级：当服务熔断后，我们需要提供新的一个兜底接口返回响应数据，如此一来，客户端能够友好的接受到响应消息。</p>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/20061171161TXFRP.jpeg', 0, 3, '1001', '2020-06-11 09:52:13', 0, 0, NULL, 0, '2020-06-11 09:52:13', '2020-06-11 09:52:13');
INSERT INTO `article` VALUES ('20061171AH7SBKWH', '云服务器快速构建WordPress博客', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">最近搞了一个博客，采用WordPress搭建的，其实本来就依托<a href=\"https://www.cnblogs.com/leechenxiang/\" style=\"color: rgb(70, 70, 70);\">cnblog</a>和公众号（风间影月）更新博文，想想自己搞一个会更好一些，独立一些，而且可以配置独立域名和主体，随之就搞了一下。当然后续也是多站点发布。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么我采用的是腾讯云，之前有活动1200搞了一台2核4g5m的机子，3年的，这段期间随便用。等差不多过期了可以降低配置从而降低费用，3年后的续费那是相当贵啊。∂<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836021-1292633686.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1576px;\"></p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">安装WordPress</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装WordPress有两种方式，第一种是自己搭建环境，有些繁琐，而且要配置php环境，哥不会搞。所以采用第二种方式，也就是云市场，如下点击重装系统：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836054-60297607.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 207px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">然后选择你要装的软件内容：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836286-1305813808.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 815px;\"><br>在这里我推荐使用centos7，因为如果你以后想装docker，可以用，而上面那个是centos6的。可惜centos7用的是apache服务器而不是nginx。这个自己决定就行。另外WordPress版本比较老，这个可以自己后续升级都行，我目前已经升级到了最新的了。</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">重装好以后，就能通过你的公网ip直接访问了，访问内容如下：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836118-206170678.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 713px;\"><br>填好信息安装即可。</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">如果提示你填入数据库相关信息，则参考如下：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836239-1353847386.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 709px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装成功以后就可以发文章访问了：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836286-1210660491.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1726px;\"></p></li></ul><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">域名解析</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">添加解析记录就行，我这里用的二级域名，如果用一级域名需要备案后再解析就行。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836053-1350822605.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1053px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">最后不要忘记，在你的博客admin设置中，把如下两个url改成你的域名即可：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200313083836053-1058904287.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 643px;\"></p><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">关于主题</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">我现在还没有主题，这是默认的，所以比较丑，等后续博文内容多了，或者迁移的多了，再设置主题也不迟。关于主题我还是建议去购买正版或者使用免费开源的，使用盗版的可能会被追责，一两百的东西没必要搞盗版那么麻烦。</p>', 7, 2, '', 0, 3, '1001', '2020-06-11 09:52:37', 0, 0, NULL, 0, '2020-06-11 09:52:37', '2020-06-11 09:52:37');
INSERT INTO `article` VALUES ('20061171HKPGC3XP', '大白话告诉你倒排索引是个啥', '<div id=\"cnblogs_post_body\" class=\"blogpost-body cnblogs-markdown\" style=\"margin-bottom: 20px; word-break: break-word; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><h3 id=\"引子\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">很多搜索引擎都是基于倒排索引，比如luncene，solr以及elasticsearch</p><h3 id=\"正排索引\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px;\">正排索引</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">聊倒排搜索之前先来看看正排索引，正排其实就是数据库表，他通过id和数据进行关联，如下：</p><table style=\"border: 1px solid rgb(223, 223, 223); word-break: break-word;\"><thead><tr><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">数据id</th><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">数据内容</th></tr></thead><tbody><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">1001</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">苹果公司发布iPhone</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">1002</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">地球引力起源于苹果</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">1003</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">iPhone屏幕碎了</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">1004</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我在苹果商店维修屏幕</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">1005</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我刚刚吃了苹果</td></tr></tbody></table><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">我们可以通过搜索id，来获得相应的数据，也能删除数据。你买了一本书，书的目录其实也是正排搜索。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">假设现在我要搜<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">苹果</code>俩字，那么他会对这张表格中每一行的数据做匹配，去查找一下，是否包含<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">苹果</code>这两个字，从第一条匹配到最后一条，如果一张表中数据量不多，几万，十几万，那么问题不大，但是一旦数据量有上百万，上千万，那么全表扫描这种的搜索性能就会有影响。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">其次，这个时候我想搜索<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">苹果iPhone</code>，那么我们无法把这词汇拆开再到数据库去搜索。</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: disc;\">优点：使用起来方便，原理也简单，比较入门</li><li style=\"list-style-type: disc;\">缺点：检索效率低下，适合简单场景使用，比如传统项目，数据量较小的项目。不支持分词搜索。</li></ul><h3 id=\"倒排索引\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px;\">倒排索引</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">与正排是反着来的，他会把文档内容进行分词，比如<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">苹果公司发布iPhone</code>是一个文档数据，当我们把他存入到搜索引擎中去的时候，会有一个文档id，这个文档id就类似于数据库主键。但是这文档存储的时候和数据库不一样，他会进行一个分词，参照上面的表格，分词后的结果如下：</p><table style=\"border: 1px solid rgb(223, 223, 223); word-break: break-word;\"><thead><tr><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">文档数据</th><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">分词结果</th></tr></thead><tbody><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">苹果公司发布iPhone</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">苹果，公司，发布，iPhone</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">地球引力起源于苹果</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">地球，引力，起源，于，苹果</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">iPhone屏幕碎了</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">iPhone，屏幕，碎了</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我在苹果商店维修屏幕</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我，在，苹果，商店，维修，屏幕</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我刚刚吃了苹果</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">我，刚刚，吃了，苹果</td></tr></tbody></table><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">每一个词汇都会和文档id关联起来，可以根据词汇来找到所有出现的id列表，如下：</p><br><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><br></p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px;\"><li></li></ul></div>', 5, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/20061171F4Z0B9AW.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 09:53:16', 0, 0, NULL, 0, '2020-06-11 09:53:16', '2020-06-11 09:53:16');
INSERT INTO `article` VALUES ('200611723H492NC0', 'VMware克隆CentOS7.X网卡修改为静态IP与分布式', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">在虚拟机vmware中往往克隆一个新的系统后，要去修改静态ip，直接使用的话可能会不尽如人意，ip也是需要管理起来的。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">在这里以Centos 7.x 为例，centos6.x的网卡静态ip方式可以搜我以前的博客（cnblog）。</p><ol style=\"padding-left: 40px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">查看网卡信息</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">ip link show\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610546-1101045216.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 788px;\"><br>ens33 是我的网卡名称，每个人的都不一样，有的也叫eth0，另外一个红框就是你的网卡地址了。把这个网卡地址复制下俩，临时保存：<code>00:0c:29:c8:49:60</code>。</p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">执行如下命令，修改网卡地址：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">vim /etc/udev/rules.d/70-persistent-ipoib.rules\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610481-1879297238.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 790px;\"><br>把注释打开，再把<code>ATTR{address}</code>修改为你的网卡地址<code>00:0c:29:c8:49:60</code>，修改后如下图：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610466-1323929994.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 795px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">修改ip信息：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">vim /etc/sysconfig/network-scripts/ifcfg-ens33\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">如下图，把IPADDR修改为你所想要的内网静态ip（需要注意，要和你的网段一致），然后还有一个<code>HWADDR</code>如果没有，则新增一个，然后再把之前的网卡地址加上，即可。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610475-1415043294.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 531px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">这是最后一步，目前的ip并没有发生更改，还是克隆之前的ip<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610536-1254578151.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 715px;\">需要重启电脑或者刷新网络，直接了当就reboot就行。。。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">ooOoOoOo 等等启动 oOoOoOoo</p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">启动完毕，测试连接</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: disc;\">填入你的ip，以及端口号还有用户名&nbsp;<img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610653-1911805189.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; width: 616px;\"></li><li style=\"list-style-type: disc;\">设置你的会话名称：&nbsp;<img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610654-1701116130.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; width: 616px;\"></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">双击这个会话：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610486-612127044.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 392px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">输入密码：默认都是root<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610650-121800341.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 404px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">进入后，可以看到ip已经OK了<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610714-1379928223.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 973px;\"></p></li></ul></li></ol><h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">Tips</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">内网的网络，虚拟机使用桥接，如果你在公司和家里都是相同网段的话，只是有线无线的区别，那么可以采用自动检测即可。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200308123610555-302466791.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 640px;\"></p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">关于内网互通原则</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">很多小伙伴都在看我的课程，由于分布式环境，那么一定要保证内网互动，不互通那么会请求不了，比如请求图片服务器，搭建lvsIP漂移等</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">内网互通原则：<ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\">1. 虚拟机中linux与本地都要关闭防火墙，设置静态ip（注意不要网络冲突）</li><li style=\"list-style-type: circle;\">2. 文件服务器（即虚拟机要和本地电脑互通）</li><li style=\"list-style-type: circle;\">3. 所有计算机节点的网段保证一致，比如 192.168.1.xxx，172.10.10.xxx</li><li style=\"list-style-type: circle;\">4. 手机和你的电脑要在同一个网络，同一个wifi，网段要检查是否一致</li><li style=\"list-style-type: circle;\">5. 客户端请求的serverUrl一定要写你电脑的内网IP，如果写localhost，那么手机是请求不了的</li><li style=\"list-style-type: circle;\">6. 主机ping虚拟机，虚拟机ping主机，都要保证OK</li><li style=\"list-style-type: circle;\">注意: 如果你的电脑使用的校内网络，可能会导致无法访问</li></ul></li></ul>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117238Z7CACH.png', 0, 3, '1001', '2020-06-11 09:54:52', 0, 0, NULL, 0, '2020-06-11 09:54:52', '2020-06-11 09:54:52');
INSERT INTO `article` VALUES ('20061176SNWBHDAW', 'CentOS7 安装 MariaDB-10.4.7', '<ol style=\"padding-left: 40px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">下载安装包</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202003/841496-20200303171456084-1580056305.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">按顺序安装依赖环境包</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">yum install rsync nmap lsof perl-DBI nc\n</code></pre><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm\n</code></pre><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm\n</code></pre></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">卸载冲突的<code>mariadb-libs</code></p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">先搜索：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -qa | grep mariadb-libs\n</code></pre></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">后删除：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -ev --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64\n</code></pre></li></ul></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装&nbsp;<code>boost-devel</code>&nbsp;依赖环境</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">yum install boost-devel.x86_64\n</code></pre></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">导入MariaDB的key</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB\n</code></pre></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装&nbsp;<code>galera</code>&nbsp;环境</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -ivh galera-4-26.4.2-1.rhel7.el7.centos.x86_64.rpm\n</code></pre></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装&nbsp;<code>libaio</code>&nbsp;<em>(此步骤在安装 10.4.8 的时候需要)</em></p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">wget http://mirror.centos.org/centos/6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm\nrpm -ivh libaio-0.3.107-10.el6.x86_64.rpm\n</code></pre></li><li style=\"list-style-type: decimal;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">安装MariaDB的4个核心包</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">rpm -ivh \nMariaDB-common-10.4.7-1.el7.centos.x86_64.rpm <br>\nMariaDB-compat-10.4.7-1.el7.centos.x86_64.rpm <br>\nMariaDB-client-10.4.7-1.el7.centos.x86_64.rpm <br>\nMariaDB-server-10.4.7-1.el7.centos.x86_64.rpm \n</code></pre></li></ol><hr style=\"font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">安装完毕MariaDB后还没完，还需要配置数据库，在命令行中执行如下代码用以启动mysql服务（MariaDB就是mysql的分支，所以服务名是一样的，如果本地有mysql可以无缝切换或安装）：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">service mysql start\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">启动成功后运行如下命令进行安全配置：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">mysql_secure_installation\n</code></pre><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">1.输入当前密码，初次安装后是没有密码的，直接回车\n2.询问是否使用`unix_socket`进行身份验证：n\n3.为root设置密码：y\n4.输入root的新密码：root\n5.确认输入root的新密码：root\n6.是否移除匿名用户，这个随意，建议删除：y\n7.拒绝用户远程登录，这个建议开启：n\n8.删除test库，可以保留：n\n9.重新加载权限表：y\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">当你看到<code>Thanks for using MariaDB!</code>这句话，表明配置成功！</p><hr style=\"font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">但是！还没完，这个时候我不能远程连接，要想远程连接还需要额外的配置，进入MariaDB的控制台:</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">输入密码</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">mysql -u root -p \n</code></pre></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">赋予root用户远程连接权限</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">grant all privileges on *.* to \'root\'@\'%\' identified by \'root密码\';\nflush privileges;\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">配置权限后，可以使用远程客户端连接数据库服务了！</p></li></ul>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/20061176SCY8BGXP.png', 0, 4, '200628AFYM7AGWPH', '2020-06-11 10:08:56', 0, 0, NULL, 0, '2020-06-11 10:08:56', '2020-06-11 10:08:56');
INSERT INTO `article` VALUES ('2006117817N4B2W0', 'MongoDB-4 GridFS 文件存储', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">1. 配置config</h3><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">spring:\n  data:\n    mongodb:\n      uri: mongodb://username:password@192.168.2.72:27017\n      database: mydb\n</code></pre><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">@Component\npublic class WebConfig {\n    @Value(\"${spring.data.mongodb.database}\")\n    private String mongodb;\n\n    @Bean\n    public GridFSBucket getGridFSBucket(MongoClient mongoClient){\n        MongoDatabase database = mongoClient.getDatabase(mongodb);\n        GridFSBucket bucket = GridFSBuckets.create(database);\n        return bucket;\n    }\n\n}\n</code></pre><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">2.&nbsp;基于gridfs的上传，读取与下载</h3><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">@Autowired\n    private GridFSBucket gridFSBucket;\n\n\n    /**\n     * 创建文件到GirdFS\n     * @param model\n     * @return\n     * @throws Exception\n     */\n    @GetMapping(\"/addToGridFS\")\n    @ResponseBody\n    public Object addToGirdFS(Model model) throws Exception {\n\n        // 声明freemarker的配置类\n        Configuration cfg = new Configuration(Configuration.getVersion());\n        // 声明freemarker模板所需要加载的目录位置\n        String classpath = this.getClass().getResource(\"/\").getPath();\n        cfg.setDirectoryForTemplateLoading(new File(classpath + \"templates\"));\n//        System.out.println(classpath + \"templates\");\n\n        // 构建数据\n        model = makeModel(model);\n\n        // 加载ftl模板\n        Template template = cfg.getTemplate(\"user.ftl\", \"utf-8\");\n        // 获得静态化后的内容\n        String htmlContent = FreeMarkerTemplateUtils.processTemplateIntoString(template, model.asMap());\n\n        InputStream inputStream = IOUtils.toInputStream(htmlContent);\n\n        // 上传\n        ObjectId fileId = gridFSBucket.uploadFromStream(\"1001.html\", inputStream);\n        System.out.println(\"上传完成。 文件ID：\" + fileId);\n\n        // 文件在mongodb中的id\n        return fileId.toString();\n    }\n\n\n    /**\n     * 读取文件\n     * @param model\n     * @return\n     * @throws Exception\n     */\n    @GetMapping(\"/readGridFS\")\n    @ResponseBody\n    public String readGridFS(Model model) throws Exception {\n\n        // 获取文件ID\n        String objectId = \"5e42924980fb940ab75f141a\"; // 根据upload后文件ID修改\n        // 获取内容\n        GridFSFindIterable gridFSFindIterable = gridFSBucket.find(Filters.eq(\"_id\", new ObjectId(objectId)));\n        GridFSFile gridFSFile = gridFSFindIterable.first();\n        System.out.println(\"filename: \" + gridFSFile.getFilename());\n\n        return gridFSFile.getFilename();\n    }\n\n    /**\n     * 从gridfs中下载文件\n     * @throws Exception\n     */\n    @GetMapping(\"/downloadGridFS\")\n    @ResponseBody\n    public String downloadGridFS() throws Exception {\n        // 获取文件ID\n        String objectId = \"5e42924980fb940ab75f141a\";\n        // 获取文件流，定义存放位置和名称\n        File file = new File(htmlTarget + \"/1001.html\");\n        // 创建输出流\n        OutputStream os = new FileOutputStream(file);\n        // 执行下载\n        gridFSBucket.downloadToStream(new ObjectId(objectId), os);\n        System.out.println(\"下载成功\");\n        return \"ok\";\n    }\n    @GetMapping(\"/downloadGridFSByFileName\")\n    @ResponseBody\n    public String downloadGridFSByFileName() throws Exception {\n        // 获取文件ID\n        String filename = \"1001.html\";\n        // 获取文件流，定义存放位置和名称\n        File file = new File(htmlTarget + \"/\" + filename);\n        // 创建输出流\n        OutputStream os = new FileOutputStream(file);\n        // 执行下载\n        gridFSBucket.downloadToStream(filename, os);\n        System.out.println(\"下载成功\");\n        return \"ok\";\n    }\n\n    /**\n     * 删除文件\n     * @param model\n     * @return\n     * @throws Exception\n     */\n    @GetMapping(\"/deleteGirdFS\")\n    @ResponseBody\n    public String deleteGirdFS(Model model) throws Exception {\n        // 获取文件ID\n        String objectId = \"5e42924980fb940ab75f141a\";\n        // 执行删除\n        gridFSBucket.delete(new ObjectId(objectId));\n        return \"ok\";\n    }</code></pre>', 2, 2, '', 0, 5, '1001', '2020-06-11 10:12:38', 0, 0, NULL, 0, '2020-06-11 10:12:38', '2020-06-11 10:12:38');
INSERT INTO `article` VALUES ('200611784WT819WH', 'RestTemplate + okhttp 实现远程调用', '<h3 id=\"1-添加依赖\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">添加依赖</h3><pre style=\"margin-top: 10px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs xml\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-comment\" style=\"color: rgb(0, 128, 0);\">&lt;!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp --&gt;</span>\n<span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;<span class=\"hljs-name\">dependency</span>&gt;</span>\n    <span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;<span class=\"hljs-name\">groupId</span>&gt;</span>com.squareup.okhttp3<span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;/<span class=\"hljs-name\">groupId</span>&gt;</span>\n    <span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;<span class=\"hljs-name\">artifactId</span>&gt;</span>okhttp<span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;/<span class=\"hljs-name\">artifactId</span>&gt;</span>\n    <span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;<span class=\"hljs-name\">version</span>&gt;</span>4.3.1<span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;/<span class=\"hljs-name\">version</span>&gt;</span>\n<span class=\"hljs-tag\" style=\"color: rgb(0, 0, 255);\">&lt;/<span class=\"hljs-name\">dependency</span>&gt;</span>\n</code></pre><h3 id=\"2-声明-resttemplate\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">2. 声明 RestTemplate</h3><pre style=\"margin-top: 10px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs java\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-meta\" style=\"color: rgb(43, 145, 175);\">@Component</span>\n<span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">public</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">class</span> <span class=\"hljs-title\" style=\"color: rgb(163, 21, 21);\">WebConfig</span> </span>{\n\n    <span class=\"hljs-comment\" style=\"color: rgb(0, 128, 0);\">/**\n     * 基于OkHttp3配置RestTemplate\n     * <span class=\"hljs-doctag\" style=\"color: rgb(128, 128, 128);\">@return</span>\n     */</span>\n    <span class=\"hljs-meta\" style=\"color: rgb(43, 145, 175);\">@Bean</span>\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">public</span> RestTemplate <span class=\"hljs-title\" style=\"color: rgb(163, 21, 21);\">restTemplate</span><span class=\"hljs-params\">()</span> </span>{\n        <span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">return</span> <span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">new</span> RestTemplate(<span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">new</span> OkHttp3ClientHttpRequestFactory());\n    }\n\n}\n</code></pre><h3 id=\"3-测试controller\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">3. 测试controller</h3><pre style=\"margin-top: 10px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs groovy\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-meta\" style=\"color: rgb(43, 145, 175);\">@RestController</span>\n<span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">public</span> <span class=\"hljs-class\"><span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">class</span> <span class=\"hljs-title\" style=\"color: rgb(163, 21, 21);\">RestTemplateController</span> {</span>\n\n    <span class=\"hljs-meta\" style=\"color: rgb(43, 145, 175);\">@Autowired</span>\n    <span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">private</span> RestTemplate restTemplate;\n\n    <span class=\"hljs-meta\" style=\"color: rgb(43, 145, 175);\">@GetMapping</span>(<span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"/testRestTemplate\"</span>)\n    <span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">public</span> GraceJSONResult testRestTemplate(Model model) {\n        ResponseEntity&lt;IMOOCJSONResult&gt; responseEntity =\n            restTemplate.getForEntity(<span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"http://localhost:8001/article/queryIndexArticleList?page=0&amp;pageSize=10\"</span>, IMOOCJSONResult.<span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">class</span>);\n        Map result = (Map)responseEntity.getBody().getData();\n        <span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">return</span> GraceJSONResult.ok(result);\n    }\n}</code></pre>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/200611784M3KNP4H.png', 0, 5, '200628AFYM7AGWPH', '2020-06-11 10:13:02', 0, 0, NULL, 0, '2020-06-11 10:13:02', '2020-06-11 10:13:02');
INSERT INTO `article` VALUES ('20061179K1XNY3R4', 'MongoDB-3 GUI客户端工具与用户权限', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">不论是mysql或者redis或者es，我们都会使用远程的客户端工具来连接数据库server，那么目前的linux上锁安装的MongoDB就是server端，我们需要有一个客户端来进行可视化的管理，常用的可以使用Navcat来操作，当然使用其他的GUI工具也都行。</p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">GUI 连接 MongoDB</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">创建连接<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195856061-1150416260.png\" alt=\"屏幕快照 2020-02-04 14.28.33\" style=\"height: auto; max-width: 100%; margin: 10px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">填入你的host所在ip，注意需要内网互通<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195855970-708264275.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 628px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">双击连接如果图标可以点亮，说明连接没问题<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195855904-1809761806.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 286px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">如下图，创建连接1后，school为数据库，3为集合，也就是创建的表<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195855944-806504743.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 283px;\">￼</p></li></ul><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">创建MongoDB用户账号权限</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">上述的创建连接是以匿名的方式去连接的，这样在公网环境下回很危险，和redis一样，都要创建用户和密码，才能连接到MongoDB，否则暴露在公网环境在忘记关闭端口的情况下会被黑客攻击。</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">修改mongodb.conf，auth改为true就代表启用授权模式：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195855933-629611831.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 378px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">重启mongodb（步骤略，参考上一篇博文）</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">进入到mongodb控制台：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">mongo\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195856029-926020464.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1210px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">在控制台输入如下命令：</p><ul style=\"list-style: none; margin-right: 0px; margin-left: 30px; padding: 0px;\"><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">使用admin库，账号再这里创建</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">use admin\n</code></pre></li><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">创建用户，账号密码分布为root，root，roles为角色root，代表超级权限</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">db.createUser({user:\"root\",pwd:\"root\",roles:[\"root\"]})\n</code></pre></li><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">附：更多角色参考如下：</p></li><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">登录：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">db.auth(\"root\",\"root\")\n</code></pre></li><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">查看用户：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">show users\n</code></pre></li><li style=\"list-style-type: circle;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">截图：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195856082-2060986338.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1455px;\">￼</p></li></ul></li></ul><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">使用Navcat重新连接</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">使用密码方式登录，输入root/root，随后即可打开连接<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200220195855990-1209946363.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 678px;\">￼</p><h3 id=\"toc_4\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">SpringBoot整合 MongoDB</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">yml 配置文件</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">spring:\n  data:\n    mongodb:\n      uri: mongodb://root:root@192.168.1.71:27017\n      database: lou1yan\n</code></pre><h3 id=\"toc_5\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">MongoDB 的CRUD（代码略）</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">可以使用MongoRepository或者mongoTemplate实现基本的CRUD</p>', 3, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/20061179GC6A7KGC.jpeg', 0, 5, '1001', '2020-06-11 10:17:20', 0, 0, NULL, 0, '2020-06-11 10:17:20', '2020-06-11 10:17:20');
INSERT INTO `article` VALUES ('2006117A19THDR8H', '疫情下的远程办公与桌面分享', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">远程办公</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">相信很多小伙伴们正因为这次疫情都窝在家里远程办公吧，我也一样，都在等具体的复工通知，我们暂定会在3月份复工~当然也有可能会提前。那么这次我们来聊聊远程办公。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758688-1915437282.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 714px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其实远程办公在很多公司都会有，我也经历过，我曾经在一家美资企业，虽然我们在办公室，但是相对于美国来说，办公室也是远程的，我们所使用的工具也需要远程连到海外通道，开会也是一样远程视频或音频。当然也有部分部门经理级别的人基本上一周只出现1次，其余时间都是远程的。包括我们现在也是，尤其是发布版本迭代的时候，有时候会因为天气因素，团队会在家远程协助，我们凌晨3点的时候也都在家候着，这其实也是远程办公。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758717-476569503.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1027px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">在家办公其实很舒服，很自在，当然也有弊端，最大的敌人就是你自己，你需要自律，你需要调整时间，你需要做到更好的时间管理，毕竟家人你也需要分配时间。那么下面我来聊一聊关于远程办公的一些个人建议。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758909-1222299599.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1009px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">首先，自律，在公司，有领导看着你，你会很自觉的去办公，而且有办公环境，你会融入进去。而在家里，诱惑很多，一会上上网，一会玩玩游戏，你的注意力很难集中到工作上，所以自律一定要养成，这一点其实很难，我是在2017年的时候，有机会能在家里远程办公，甚至到现在我们还有这样的福利，所以自律的习惯已经被很好的养成了。这样的话你的工作效率在家也能很高。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759032-771731924.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1029px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其次，要有良好的作息规律，平时大家都会在23-24点左右睡觉，早上6-7点（时间因人而异）起来，正因为这次疫情，很多人都懒散了（当然也包括你的领导和老板），早上睡到10点，晚上凌晨3点睡觉，这很正常吧，我也是。。这很不好，因为一旦复工，你会很不习惯，而且会很累，所以我很快改正了这样的作息，早上不需要太早，但是8点之前也必须起床了，虽然你的同事和领导可能还没在线，那你不如看看帖子，洞察技术，不行么？当然，充足的睡眠还是要保证的，我建议至少保证7小时的睡眠，这样对第二天的精神是最好的。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758831-1048511613.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1032px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第三个，不要把任务拖到最后，远程办公后最大的一个变化就是任务量变少了，没有以前那么急，比如一个需求原先给你1天时间，现在给你5天，所以很多人就会拖时间，毕竟拖延症大家都会有。但是时间多了，其实你可以花更多的心思把任务做的更好，因为领导看得见，而且如果你能站在产品的角度提出更多的人性化需求，那会更好。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759053-127588630.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1021px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第四一点，人际（客户）管理，这一点绝大部分小伙伴在平时公司里也不会去做。但是如果你是一名TL，PM，TM或者职业经理人，那么在你平时的业务领域里肯定或多或少会接触一些人，人是很好很重要的资源，在家里远程了，时间更多了，花点时间和曾经打过交道的人联系一下，彼此关心也是好的。说到底，在整个项目管理过程中，人最重要，沟通也很重要，这是非常常见的一道面试题噢~<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759063-826637843.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1014px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第五，开会，开会的时候大家都会拿出微信来视频聊天，汇报工作，这是我身边朋友用的最多的远程会议方式，但是呢，不要有事没事就开会，这也是我个人吐槽的，领导一遇到一些小问题，就得拉上整个团队开会，前几天我们一天开了13次会。。。其实没啥好聊的，他纯粹无聊-_-|||。其实我个人建议在工作时间尽量减少微信的使用，使用团队管理工具是最好的，或者一些专业的远程会议工具，当然这些可能需要公司去采购了。相对来说，我会推荐腾讯的TIM，这是偏向于办公的企业QQ，很好用，无广告；至于阿里的钉钉就甭提了，追命三连钉。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759208-433563581.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1036px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">第六，自我提升，如果你有更多的时间，不如多读两本书，或者去考个证都行，比如PMP/ACP/PBA项目管理，NPDP产品管理等，这些都是很好的提升，我曾经考过MCP,SUN JSCP,PMP等，毕竟有总比没得好~<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759117-2120581420.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 403px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">最后，娱乐，在家里，如果你曾经一天的工作时间是12小时的话，那么现在可能会减少一半，多出来的时间咋搞？娱乐呀，在家也能娱乐，趁着有时间，把以前买的PS4,XBOX,SWITCH游戏大玩特玩呀，拿出手柄来场球赛呗~<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759043-493219219.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1038px;\">￼</p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">桌面show</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">我曾经的桌面是开放式的，很容易被打扰，现在是一个独立的房间，这样其实会很好，办公的时候也不易被打扰。要不然就是这样的：<br><br>那么我的桌面布置是这样的：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759172-711793029.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1025px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">首先是有谱的人工体椅子，还行，坐着挺舒服的，毕竟我们做互联网的，每天都坐着，对腰好一点，他好我也好~<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759286-660520646.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 556px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">桌面右侧，依次如下，bose的喇叭，钢铁侠，还有小企鹅，故宫博物院的杯垫：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759286-894520522.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1019px;\">￼<br>这款钢铁侠的上色还是比较不错的，尤其金色和红色，上色细节都很好~<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759004-290539303.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 543px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">随后是主要办公区域，dell的27寸显示器，MacBook13寸16g内存，底部是淘汰下来的iPhone6作为时钟。键盘的cherry茶轴，鼠标是逻辑M705，鼠标垫是cherry的漫威合作款灭霸，主要是没异味。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759117-2033556012.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 772px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">至于MacBook是用的雷电3扩展坞，一条线搞定所有设备：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758912-554568189.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 964px;\">￼<br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">这是背面了，走线可以被MacBook挡住，还行，遮丑：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758871-56172017.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 507px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">显示器背面的线也是能收纳就隐藏，避免暴露<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192758840-1189385151.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 543px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">音响呢是bose的，放在了桌下角落，双11京东买的：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759208-1109969075.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 556px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">这是另外一个小角落，放些杂物<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759208-312383392.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1018px;\">￼￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">另外背面呢是一个漫威10周年的壁画，还行，任务细节看的挺清楚的。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759004-270687520.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 725px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">后续有时间空了做个视频，来讲解如何布置桌面和走线的，这个桌下还是比较惨不忍睹的，毕竟走线都往下了，一个拖线板带所有的电器，扩展坞的外置电源也是悬挂的。<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200215192759117-457670385.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1016px;\">￼</p><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">最后的最后</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">相信很多人在年前都是996甚至9107的状态，没有时间陪家人，所以趁这次远程在家办公的机会，多给家人分配时间去陪伴，多陪陪伴侣，多陪陪孩子，多陪陪父母，和父母唠唠嗑</p>', 7, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/20061179RZHXZWPH.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:18:39', 0, 0, NULL, 0, '2020-06-11 10:18:39', '2020-06-11 10:18:39');
INSERT INTO `article` VALUES ('2006117ABRHGKXWH', 'MongoDB-2 安装与配置', '<h3 id=\"安装建议\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">安装建议</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">MongoDB 可以在mac/win/linux上安装，我个人建议在linux上安装会更好，这样测试起来更方便。一般来说本地只装mysql或者MariaDB，其余的中间件一律放linux，让电脑软件解耦，毕竟你的电脑不是一直处于工作状态，有时候也是用于娱乐的~</p><h3 id=\"安装步骤\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">安装步骤</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">打开官网：<a href=\"https://www.mongodb.com/download-center/community\" style=\"color: rgb(70, 70, 70);\">https://www.mongodb.com/download-center/community</a></li><li style=\"list-style-type: disc;\">选择版本进行下载，在这里就以linux为安装演示</li><li style=\"list-style-type: disc;\">需要注意，4.0.16包含linux 64位版本下载，而4.2.3中暂未包含，当然你要选择其他的linux版本下载也可以，另外最新的4.3.3位开发版，不建议使用<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123603443-1273425369.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%;\"></li><li style=\"list-style-type: disc;\">下载好后，上传到linux中，如下：</li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123603717-390247619.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">解压缩：</p><pre style=\"margin-top: 10px; white-space: pre-wrap;\"><code class=\"hljs css\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-selector-tag\" style=\"color: rgb(0, 0, 255);\">tar</span> <span class=\"hljs-selector-tag\" style=\"color: rgb(0, 0, 255);\">-zxvf</span> <span class=\"hljs-selector-tag\" style=\"color: rgb(0, 0, 255);\">mongodb-linux-x86_64-4</span><span class=\"hljs-selector-class\">.0</span><span class=\"hljs-selector-class\">.16</span><span class=\"hljs-selector-class\">.tgz</span>\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">得到：</p></li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123604217-486556759.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">重命名解压缩后的文件夹并且移动到&nbsp;<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">/usr/local</code>&nbsp;中：</p><pre style=\"margin-top: 10px; white-space: pre-wrap;\"><code class=\"hljs lua\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\">mv mongodb-linux-x86_64<span class=\"hljs-number\">-4.0</span><span class=\"hljs-number\">.16</span> /usr/<span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">local</span>/mongodb\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123604500-1486530451.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123604746-1204938508.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">使其生效：</p><pre style=\"margin-top: 10px; white-space: pre-wrap;\"><code class=\"hljs r\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-keyword\" style=\"color: rgb(0, 0, 255);\">source</span> /etc/profile\n</code></pre></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">查看MongoDB版本：</p><pre style=\"margin-top: 10px; white-space: pre-wrap;\"><code class=\"hljs nginx\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">mongo</span> -version\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123604974-1939025354.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li></ul><h3 id=\"配置mongodb\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">配置MongoDB</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">在MongoDB根目录中创建 data/db 目录，用于存储数据库文件数据，并且再创建 data/logs/mongodb.log 用于存储日志</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123605194-1276211592.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123605512-1516942620.jpg\" alt=\"file\" loading=\"lazy\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">在mongodb根目录下创建核心配置文件，并且追加配置内容如下：</p></li></ul><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><pre style=\"margin-top: 10px; white-space: pre-wrap;\"><code class=\"hljs nginx\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">mongod</span> -f mongodb.conf<img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200214123607005-2038946580.jpg\" alt=\"file\" loading=\"lazy\" style=\"font-family: 微软雅黑, 宋体, Arial; font-size: 15px; height: auto; max-width: 100%; margin: 10px;\"></code></pre></li></ul>', 7, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117A57RKAMRP.png', 0, 3, '1001', '2020-06-11 10:19:46', 0, 0, NULL, 0, '2020-06-11 10:19:46', '2020-06-11 10:19:46');
INSERT INTO `article` VALUES ('2006117B1H81BY14', 'MongoDB-1 入门', '<h3 id=\"基础概念\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">基础概念</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">MongoDB 是非关系型数据库，也就是nosql，存储json数据格式会非常灵活，要比mysql更好，同时也能为mysql分摊一部分的流量压力。另外呢，对于非事务的数据完全可以保存到MongoDB中，这些数据往往也是非核心数据。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">以下是MongoDB和数据库以及ElasticSearch的术语对比：</p><table style=\"border: 1px solid rgb(223, 223, 223); word-break: break-word; font-family: 微软雅黑, 宋体, Arial; font-size: 15px; background-color: rgb(255, 255, 255);\"><thead><tr><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">数据库</th><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">ElasticSearch</th><th style=\"background-color: rgb(250, 250, 250); border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">MongoDB</th></tr></thead><tbody><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">database</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">es库</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">database</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">table 表</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">index 索引</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">collection 数据集合</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">row 行（记录）</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">document 文档（json）</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">document 文档（json）</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">column 字段列</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">field 域</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">field 域</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">index 索引</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">-</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">index 索引</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">join 表关联查询</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">-</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">-</td></tr><tr><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">pk 主键</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">_id</td><td style=\"border: 1px solid rgb(192, 192, 192); border-collapse: collapse; padding: 8px 14px; min-width: 50px;\">_id</td></tr></tbody></table><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">MongoDB可以创建多个数据库（同mysql）</li><li style=\"list-style-type: disc;\">一个数据库可以创建多个collection（同mysql创建多表）</li><li style=\"list-style-type: disc;\">一个集合可以包含很多文档数据（同mysql一张表包含很多行记录）</li></ul><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">我们可以通过如下代码片段来更好的理解MongoDB的数据对比，假设这张表中总记录有3条：</p><pre style=\"margin-top: 10px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"hljs less\" style=\"line-height: 1.5 !important; margin: auto; vertical-align: middle; display: block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204) !important; padding: 5px !important; border-radius: 3px !important; height: auto; overflow-x: auto; color: rgb(0, 0, 0);\"><span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">UserList</span>: [\n	{\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">userId</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"1001\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">username</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"lee\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">age</span>: <span class=\"hljs-number\">18</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">sex</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"boy\"</span>	\n	},\n	{\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">userId</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"1002\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">username</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"jay\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">age</span>: <span class=\"hljs-number\">20</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">sex</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"boy\"</span>	\n	},\n	{\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">userId</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"1003\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">username</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"jolin\"</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">age</span>: <span class=\"hljs-number\">19</span>,\n		<span class=\"hljs-attribute\" style=\"color: rgb(163, 21, 21);\">sex</span>: <span class=\"hljs-string\" style=\"color: rgb(163, 21, 21);\">\"girl\"</span>	\n	}\n]\n</code></pre><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">如上述代码中：</p><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\">UserList是一个<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">collection</code>，在mysql中可以当做是一张表</li><li style=\"list-style-type: disc;\">UserList中的每个<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">{}</code>都是一个json对象，他们称之为<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">document文档</code>，在mysql中称之为行记录</li><li style=\"list-style-type: disc;\">userId、username、age、sex 这些都是<code style=\"line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; font-family: &quot;Courier New&quot;, sans-serif !important; font-size: 12px !important; background-color: rgb(245, 245, 245) !important; border: 1px solid rgb(204, 204, 204) !important; padding: 0px 5px !important; border-radius: 3px !important;\">field 域</code>，在MySQL中称之为column列字段</li></ul><h4 id=\"文章比较短，下一遍会来讲一下怎么搭建运行的\" style=\"font-size: 14px; font-weight: bold; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">文章比较短，下一遍会来讲一下怎么搭建运行的</h4>', 7, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B1AC7SW94.png', 0, 5, '200628AFYM7AGWPH', '2020-06-11 10:21:41', 0, 0, NULL, 0, '2020-06-11 10:21:41', '2020-06-11 10:21:41');
INSERT INTO `article` VALUES ('2006117B57WRZGHH', 'SSI 网页内嵌技术', '<h3 id=\"toc_0\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">引子</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">一般来说我们开发网页的时候，大多都会以一个大的HTML页面来做，来开发，来发布，来维护。初期可能就1-2人维护，随着业务发展，功能迭代，一个首页会相当复杂，那么就有可能会有一个团队来维护，首页包含的功能会有很多，比如，轮播图，分类，商品推荐，广告等等，可以看一下京东：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170617494-1793500427.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1849px;\">￼<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170617580-1718749079.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1847px;\">￼<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170617778-1271940809.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1846px;\">￼</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">以上三张图中的红框部分，其实都是每个页面中的一个小功能，他们都可以单独拿出来作为一个单独的页面，随后再嵌入到页面中，如此一来，就更加便于团队的开发和维护了，同时也能提供公用化的功能，减少重复代码。</p><h3 id=\"toc_1\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">SSI</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么如何进行网页内嵌呢，我相信经历过jsp时代的应该会知道include，其实我们这里使用的原理也是一样的。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">SSI就是server side include，网页服务端内嵌技术，像Apache，Nginx都支持。可以把页面拆分成小页面后，再合并聚合在一起显示给用户。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">ssi的可定义扩展名为：<em>.stm、</em>&nbsp;<em>.shtm、</em>&nbsp;<em>.shtml</em></p><h3 id=\"toc_2\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">标签使用</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">如下，看似和jsp的include是类似的，道理也是一样的</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-size: 15px; background-color: rgb(255, 255, 255);\"><code class=\"language-text\">&lt;!--#include virtual=\"/pages/index/abc.html\"  --&gt;\n</code></pre><h3 id=\"toc_3\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">在nginx中配置ssi</h3><ul style=\"list-style: none; margin-right: 0px; margin-bottom: 0px; margin-left: 30px; padding: 0px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">如何安装nginx的，不多说了，参考我以前的博客：<br><a href=\"https://www.cnblogs.com/leechenxiang/p/7086298.html\" style=\"color: rgb(70, 70, 70);\">https://www.cnblogs.com/leechenxiang/p/7086298.html</a></p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">准备如下页面，主要是配置首页的include标签：</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">nginx中的ssi配置如下：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170616360-2141114435.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1103px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">nginx.conf 配置：</p><pre style=\"margin-bottom: 0px; white-space: pre-wrap;\"><code class=\"language-text\">server {\n    listen       80;<br>\n    server_name  localhost;<br>\n    # 开启 ssi<br>\n    ssi on;<br>\n    # ssi 出错是不会打印日志<br>\n    ssi_silent_errors on;<br>\n    # 默认的静态页面后缀为 html，如果想自定义，比如使用shtml则开启下方注释<br>\n    # ssi_types text/shtml;<br>\n    location / {<br>\n        # root   html;<br>\n        # 指定静态文件所在位置<br>\n        root        ssi;<br>\n        # 默认首页，如果你的后缀在上方修改为 *.shtml，则下方也需要跟着修改<br>\n        index       index.html index.htm;<br>\n    }<br>\n}\n</code></pre></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">html如下：<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170614409-1512999025.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 382px;\">￼<br><img src=\"https://img2018.cnblogs.com/blog/841496/202002/841496-20200203170615876-1958615048.jpg\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px; width: 1018px;\">￼</p></li><li style=\"list-style-type: disc;\"><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px;\">github地址：<a href=\"https://github.com/leechenxiang/ssi-demo\" style=\"color: rgb(70, 70, 70);\">https://github.com/leechenxiang/ssi-demo</a></p></li></ul><h3 id=\"toc_4\" style=\"font-size: 16px; font-weight: bold; line-height: 1.5; margin-top: 10px; margin-right: 0px; margin-left: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, 宋体, Arial;\">精品推荐</h3><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">如果你是一名java开发人员，在如此激烈的竞争中，为亲爱的你推荐如下架构师进阶课程噢~<br><a href=\"https://class.imooc.com/sale/javaarchitect\" style=\"color: rgb(70, 70, 70);\">https://class.imooc.com/sale/javaarchitect</a></p>', 5, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:22:05', 0, 0, NULL, 0, '2020-06-11 10:22:05', '2020-06-11 10:22:05');
INSERT INTO `article` VALUES ('2006117BAG3D5B54', 'Springboot2.X 文件上传的大小限制', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">在yml中配置上传大小的限制，如下：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">2. 配置全局异常捕获：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">3.3 的解决方案，这问题主要由于tomcat的的文件大小限制，超过了默认的开销大小，就直接取消这个用户请求了，限制了你的访问，这没毛病，只不过没有任何的提示（因为服务器默认你的请求是恶意请求，就直接中断了，不给你回应，这本质是好意~），如果需要提示，则需要再次在yml中新增一个配置项，如下设置-1或者100MB即可</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><pre style=\"margin-bottom: 0px; white-space: pre-wrap; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">server:</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">\n  tomcat:</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">\n    max</span>-swallow-size: -1  # tomcat默认大小2M，超过2M的文件不会被捕获，需要调整此处大小为100MB或者-<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">1即可<br></span></pre></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/i-beta/841496/202001/841496-20200112231055898-1806988271.png\" alt=\"\" width=\"494\" height=\"315\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/i-beta/841496/202001/841496-20200112231153753-14895706.png\" alt=\"\" width=\"497\" height=\"257\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p>', 5, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B8C9NXH28.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:22:38', 0, 0, NULL, 0, '2020-06-11 10:22:38', '2020-06-11 10:22:38');
INSERT INTO `article` VALUES ('2006117BHM832H4H', '安装Ruby 2.3.0', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">安装最新的redis集群需要用到的rb脚本要ruby2.3.0版本，centos7默认的是2.0.0，很显然报错不行，所以安装呗，使用rvm安装，安装步骤如下：</p><div class=\"cnblogs_Highlighter sh-gutter\" style=\"font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><div id=\"highlighter_80780\" class=\"syntaxhighlighter  bash\" style=\"width: 960px; margin: 1em 0px !important; position: relative !important; overflow: auto !important; font-size: 1em !important;\"><br></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">最后查看ruby版本：</p><div class=\"cnblogs_Highlighter sh-gutter\" style=\"font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><div id=\"highlighter_377007\" class=\"syntaxhighlighter  bash\" style=\"width: 960px; margin: 1em 0px !important; position: relative !important; overflow: auto !important; font-size: 1em !important;\"></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">显示2.3.0，OK搞定~！</p>', 9, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:23:18', 0, 0, NULL, 0, '2020-06-11 10:23:18', '2020-06-11 10:23:18');
INSERT INTO `article` VALUES ('2006117BYGC77R40', 'centos6中安装新版 Elasticsearch 7.x', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">es出新版了，虽然公司里还是用的老版本，但是本地还是有必要自己安装了玩玩</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">下载地址：<a href=\"https://www.elastic.co/cn/downloads/elasticsearch\" style=\"color: rgb(70, 70, 70);\">https://www.elastic.co/cn/downloads/elasticsearch</a></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520233625191-3494725.png\" alt=\"\" width=\"786\" height=\"99\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">解压es的tar包：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520234206028-1551081974.png\" alt=\"\" width=\"1082\" height=\"43\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;随后进入解压后es的目录，如下：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">依次说一下目录结构吧：&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">随后进入conf目录，使用vim 修改 elasticearch.yml</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520234837914-131554419.png\" alt=\"\" width=\"952\" height=\"321\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">修改集群名称，默认是elasticsearch，虽然目前是单机，但是也会有默认的</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520235050863-1762605354.png\" alt=\"\" width=\"458\" height=\"31\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;为当前的es节点取个名称，名称随意，如果在集群环境中，都要有相应的名字</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520235311646-1119153695.png\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">这是修改数据和日志的存储目录</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;<img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520235553198-1910340353.png\" alt=\"\" width=\"709\" height=\"230\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">设置绑定的ip，和redis一个道理，设置为0.0.0.0以后就可以让任何计算机节点访问到你了&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190520235725403-1175568330.png\" alt=\"\" width=\"596\" height=\"225\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;设置在集群中的所有节点名称，这个节点名称就是之前所修改的，当然你也可以采用默认的也行，目前是单机，放入一个节点即可</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;<img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190521000007828-412443851.png\" alt=\"\" width=\"748\" height=\"53\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">修改完毕后，保存退出vim，随后就准备启动es了，进入到bin目录，运行es：./elasticsearch</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">无法使用root用户来运行es，这是es的设计，为了安全<br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么这个时候就需要创建一个新用户，并且为这个用户添加es目录的操作权限了</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201905/841496-20190521001225751-2087490278.png\" alt=\"\" width=\"848\" height=\"71\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">切换用户以后，再次运行&nbsp; ./elasticserch&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">此时又报错，来看一下：</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><pre style=\"margin-bottom: 0px; white-space: pre-wrap; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\">java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel <span style=\"color: rgb(128, 0, 128); line-height: 1.5 !important;\">3.5</span>+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER</pre></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">其实从异常可以看出是不支持的操作系统，主要是 seccomp，那么重新进入 conf 下去配置 elasticsearch.yml&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">改完以后重新切换到非root用户lee下，运行e&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">那么安装到此完毕！</p>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117BP7C3986W.png', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:24:21', 0, 0, NULL, 0, '2020-06-11 10:24:21', '2020-06-11 10:24:21');
INSERT INTO `article` VALUES ('2006117CCBG5GR40', 'nrm 安装与npm镜像切换', '<p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">家里宽带用的移动的。。。访问海外镜像是相当慢，npm和maven一个道理，maven可以切换到淘宝镜像或者其他的，那么npm也可以使用国内镜像，这个时候就需要用到nrm来做镜像管理了</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">首先这是目前本地node以及npm版本：</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201904/841496-20190410195436777-2072817490.png\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">然后安装 nrm，安装命令为：</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><pre style=\"margin-bottom: 0px; white-space: pre-wrap; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\">npm i nrm -g</pre></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201904/841496-20190410195637889-2078876251.png\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">然后查看目前的镜像列表：</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><pre style=\"margin-bottom: 0px; white-space: pre-wrap; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\">nrm ls</pre></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201904/841496-20190410195747495-1587498447.png\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">这个 * 就代表当前使用的镜像</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">当然下面有很多，可以去切换，切换命令为：</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><pre style=\"margin-bottom: 0px; white-space: pre-wrap; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\">nrm use taobao</pre></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\"><img src=\"https://img2018.cnblogs.com/blog/841496/201904/841496-20190410195840558-2090501083.png\" alt=\"\" style=\"height: auto; max-width: 100%; margin: 10px;\"></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; line-height: 24px; font-family: 微软雅黑, 宋体, Arial; font-size: 15px;\">这个时候 * 在淘宝这一行，表明已经切换到了淘宝镜像，OK，安装完毕</p><div><br></div>', 10, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-06-11 10:25:51', 0, 0, NULL, 0, '2020-06-11 10:25:51', '2020-06-11 10:25:51');
INSERT INTO `article` VALUES ('2006219SGB5T9TXP', '321', '<p>321</p>', 2, 1, 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006219SATZC34SW.png', 0, 5, '200628AFYM7AGWPH', '2020-06-21 13:44:20', 0, 0, NULL, 0, '2020-06-21 13:44:20', '2020-06-21 13:44:20');
INSERT INTO `article` VALUES ('20072493D11DDWX4', '基于云落地SLB+Tengine实现高可用集群负载均衡', '<div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><h1 style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 14px;\">基于云落地SLB+Tengine实现高可用集群负载均衡 - 下</h1></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><p style=\"margin-bottom: 0px; padding: 0px;\">本次分享基于618慕课网直播，更多精彩可以关注：<a href=\"https://class.imooc.com/sale/javaarchitect\" style=\"outline: 0px; color: rgb(28, 31, 33);\">https://class.imooc.com/sale/javaarchitect</a></p></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><h3 style=\"margin: 0px; padding: 0px; font-size: 16px; line-height: 32px;\">服务器配置</h3></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><p style=\"margin-bottom: 0px; padding: 0px;\">4台阿里云节点：</p></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><ul style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; list-style: none;\"><li style=\"margin: 0px; padding: 0px;\">2核2g * 1</li><li style=\"margin: 0px; padding: 0px;\">1核1g * 3</li></ul></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><p style=\"margin-bottom: 0px; padding: 0px;\">部署：</p></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><ul style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; list-style: none;\"><li style=\"margin: 0px; padding: 0px;\">2核2g：tomcat + tengine</li><li style=\"margin: 0px; padding: 0px;\">1核1g：tomcat</li></ul></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><h3 style=\"margin: 0px; padding: 0px; font-size: 16px; line-height: 32px;\">SLB负载均衡器介绍</h3></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><p style=\"margin-bottom: 0px; padding: 0px;\">官方详细介绍：<a href=\"https://help.aliyun.com/document_detail/27539.html\" style=\"outline: 0px; color: rgb(28, 31, 33);\">https://help.aliyun.com/document_detail/27539.html</a></p></div><div class=\"cl-preview-section\" style=\"margin: 0px; padding: 0px; color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><p style=\"margin-bottom: 0px; padding: 0px;\">本质上，使用任何一家云厂商的都可以，每家厂商的名字取名不同，腾讯叫做CLB，阿里叫做SLB。都是负载均衡器，购买的时候需要注意，不同类型的SLB所支持的并发也不同。可以参考如下图：<a href=\"https://help.aliyun.com/document_detail/85931.html\" style=\"outline: 0px; color: rgb(28, 31, 33);\">https://help.aliyun.com/document_detail/85931.html</a></p></div><p><br style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><span style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\">作者：风间影月</span><br style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><span style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\">链接：https://www.imooc.com/article/306157</span><br style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><span style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\">来源：慕课网</span><br style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\"><span style=\"color: rgb(28, 31, 33); font-family: &quot;PingFang SC&quot;, 微软雅黑, &quot;Microsoft YaHei&quot;, Helvetica, &quot;Helvetica Neue&quot;, Tahoma, Arial, sans-serif; background-color: rgb(248, 250, 252);\">本文原创发布于慕课网 ，转载请注明出处，谢谢合作</span><br></p>', 12, 1, 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/20072493C1D85XWH.png', 0, 3, '200628AFYM7AGWPH', '2020-07-24 12:47:02', 0, 0, NULL, 0, '2020-07-24 12:47:02', '2020-07-24 12:47:02');
INSERT INTO `article` VALUES ('20072494SAAGW4X4', 'r32r32', '<p>r3r43</p>', 12, 1, 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/20072494S329DZF8.png', 0, 5, '200628AFYM7AGWPH', '2020-07-26 02:03:04', 0, 0, NULL, 0, '2020-07-24 12:51:02', '2020-07-24 12:51:02');
INSERT INTO `article` VALUES ('2007268MHTGXBS3C', '32人防2个推该3该3公用天他', '<p>够用5条5条呀64㢥科密欧，&nbsp;</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-07-26 12:08:24', 0, 0, NULL, 1, '2020-07-26 12:08:24', '2020-07-26 12:08:24');
INSERT INTO `article` VALUES ('2008129SM5W9MA80', '1122', '<p>2r32r23</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 13:44:38', 0, 0, NULL, 0, '2020-08-12 13:44:38', '2020-08-12 13:44:38');
INSERT INTO `article` VALUES ('2008129Y6G3170X4', '333', '<p>333</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 13:55:23', 0, 0, NULL, 0, '2020-08-12 13:55:23', '2020-08-12 13:55:23');
INSERT INTO `article` VALUES ('2008129YM0WC9Y5P', '3433', '<p>33</p>', 9, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 13:56:37', 0, 0, NULL, 0, '2020-08-12 13:56:37', '2020-08-12 13:56:37');
INSERT INTO `article` VALUES ('2008129Z4YMS35D4', 'retretre', '<p>greyt</p>', 6, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 13:58:13', 0, 0, NULL, 0, '2020-08-12 13:58:13', '2020-08-12 13:58:13');
INSERT INTO `article` VALUES ('2008129ZA980Z1GC', '879879', '<p>9879879</p>', 7, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 13:58:48', 0, 0, NULL, 0, '2020-08-12 13:58:48', '2020-08-12 13:58:48');
INSERT INTO `article` VALUES ('200812A14M41Z168', '333', '<p>2re32e</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:04:12', 0, 0, NULL, 0, '2020-08-12 14:04:12', '2020-08-12 14:04:12');
INSERT INTO `article` VALUES ('200812A2SC6ZKF3C', '废物范围', '<p>f\'we\'f\'we</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:09:06', 0, 0, NULL, 0, '2020-08-12 14:09:06', '2020-08-12 14:09:06');
INSERT INTO `article` VALUES ('200812A37XH2HYRP', '432', '<p>453223</p>', 6, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:10:33', 0, 0, NULL, 0, '2020-08-12 14:10:33', '2020-08-12 14:10:33');
INSERT INTO `article` VALUES ('200812A4R7CN6W94', '4324', '<p>32423</p>', 3, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:14:59', 0, 0, NULL, 0, '2020-08-12 14:14:59', '2020-08-12 14:14:59');
INSERT INTO `article` VALUES ('200812A759KD15KP', '热污染翁', '<p>re\'w\'re</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:22:17', 0, 0, NULL, 0, '2020-08-12 14:22:17', '2020-08-12 14:22:17');
INSERT INTO `article` VALUES ('200812AARDT1M140', 't53ty35', '<p>t35t3</p>', 11, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-12 14:33:01', 0, 0, NULL, 0, '2020-08-12 14:33:01', '2020-08-12 14:33:01');
INSERT INTO `article` VALUES ('20081378T1W8G0H0', 'r42r', '<p>32r32</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 10:14:59', 0, 0, NULL, 0, '2020-08-13 10:14:59', '2020-08-13 10:14:59');
INSERT INTO `article` VALUES ('2008138M3K7YXHBC', '这是用来测试的HTML', '<p>这是用来测试的HTML<br></p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 12:06:59', 0, 0, NULL, 0, '2020-08-13 12:06:59', '2020-08-13 12:06:59');
INSERT INTO `article` VALUES ('2008139680XM5SK4', '12312321', '<p>321321321</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 12:55:30', 0, 0, NULL, 0, '2020-08-13 12:55:30', '2020-08-13 12:55:30');
INSERT INTO `article` VALUES ('20081397KZSMCYCH', '2132', '<p>321321</p>', 3, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 12:59:34', 0, 0, NULL, 0, '2020-08-13 12:59:34', '2020-08-13 12:59:34');
INSERT INTO `article` VALUES ('200813980FTKHXS8', '若3让3若人', '<p>35653元</p>', 3, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:00:42', 0, 0, NULL, 0, '2020-08-13 13:00:42', '2020-08-13 13:00:42');
INSERT INTO `article` VALUES ('20081398F7734YRP', '图4563同一4有个', '<p>&nbsp;天3τ34&nbsp;</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:02:10', 0, 0, NULL, 0, '2020-08-13 13:02:10', '2020-08-13 13:02:10');
INSERT INTO `article` VALUES ('20081398PPCZRFCH', '4323', '<p>让4让2&nbsp;</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:02:52', 0, 0, NULL, 0, '2020-08-13 13:02:52', '2020-08-13 13:02:52');
INSERT INTO `article` VALUES ('20081399AWFYSPPH', '342rt', '<p>432r4</p>', 3, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:04:49', 0, 0, NULL, 0, '2020-08-13 13:04:49', '2020-08-13 13:04:49');
INSERT INTO `article` VALUES ('2008139AC4MT64PH', 'r43ty5t', '<p>htrh5hy</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:07:57', 0, 0, NULL, 0, '2020-08-13 13:07:57', '2020-08-13 13:07:57');
INSERT INTO `article` VALUES ('2008139AHWYH7PSW', '5635654hy4', '<p>y54y54y45y</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-13 13:08:27', 0, 0, NULL, 0, '2020-08-13 13:08:27', '2020-08-13 13:08:27');
INSERT INTO `article` VALUES ('20081484R6A201YW', '32432个推435个月', '<p>热汤4台 天3</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-14 11:26:50', 0, 0, NULL, 0, '2020-08-14 11:26:50', '2020-08-14 11:26:50');
INSERT INTO `article` VALUES ('2008148NHRM4MFFW', 't3t35yg3tr', '<p>t43t43t3</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-14 12:11:24', 0, 0, NULL, 0, '2020-08-14 12:11:24', '2020-08-14 12:11:24');
INSERT INTO `article` VALUES ('2008148PDK315XGC', 're324r32', '<p>tr432r432</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-14 12:14:04', 0, 0, '', 0, '2020-08-14 12:14:04', '2020-08-14 12:14:04');
INSERT INTO `article` VALUES ('2008148RBYTK1ZTC', '423t43', '<p>r234r23r243r</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-14 12:16:53', 0, 0, '', 0, '2020-08-14 12:16:53', '2020-08-14 12:16:53');
INSERT INTO `article` VALUES ('2008148RM4M600M8', 't54t54', '<p>y54t45</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-14 12:17:33', 0, 0, '', 0, '2020-08-14 12:17:33', '2020-08-14 12:17:33');
INSERT INTO `article` VALUES ('2008169340KT5PZC', 'r324r432r', '<p>4r432r32</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-16 12:46:04', 0, 0, NULL, 0, '2020-08-16 12:46:04', '2020-08-16 12:46:04');
INSERT INTO `article` VALUES ('200816961ZYBXFRP', 'r32r342r432r', '<p>r32r43r243r23</p>', 5, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-16 12:54:51', 0, 0, '5f38bc1f9e1697546e259e7f', 0, '2020-08-16 12:54:51', '2020-08-16 12:54:51');
INSERT INTO `article` VALUES ('2008169K5WR650BC', '天3条5', '<p>τ443条3条&nbsp;</p>', 3, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-16 13:28:18', 0, 0, '5f38c3fe48648760b76b2048', 0, '2020-08-16 13:28:18', '2020-08-16 13:28:18');
INSERT INTO `article` VALUES ('2008169KN5C1T3F8', '436t3gt3', '<p>t43t43t</p>', 2, 2, '', 0, 3, '200628AFYM7AGWPH', '2020-08-16 13:29:43', 0, 0, '5f38c44a47ca7f1133c91f11', 1, '2020-08-16 13:29:43', '2020-08-16 13:29:43');
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int(2) NOT NULL AUTO_INCREMENT,
  `name` varchar(12) NOT NULL COMMENT '分类名，比如：科技，人文，历史，汽车等等',
  `tag_color` varchar(12) NOT NULL COMMENT '标签颜色',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COMMENT='新闻资讯文章的分类（或者称之为领域）';

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES (2, '汽车', '#8939bd');
INSERT INTO `category` VALUES (3, '娱乐', '#c939aa');
INSERT INTO `category` VALUES (5, '地理', '#57394a');
INSERT INTO `category` VALUES (6, '历史', '#29ab4a');
INSERT INTO `category` VALUES (7, '科技', '#2467bc');
INSERT INTO `category` VALUES (9, '体育', '#c98f4a');
INSERT INTO `category` VALUES (10, '搞笑', '#68b84a');
INSERT INTO `category` VALUES (11, '技术', '#c9394a');
INSERT INTO `category` VALUES (12, '慕课', '#682aa8');
INSERT INTO `category` VALUES (13, '技能', '#c9394a');
COMMIT;

-- ----------------------------
-- Table structure for comments
-- ----------------------------
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
  `id` varchar(24) NOT NULL,
  `writer_id` varchar(24) NOT NULL COMMENT '评论的文章是哪个作者的关联id',
  `father_id` varchar(24) NOT NULL COMMENT '如果是回复留言，则本条为子留言，需要关联查询',
  `article_id` varchar(24) NOT NULL COMMENT '回复的那个文章id',
  `article_title` varchar(64) NOT NULL COMMENT '冗余文章标题，宽表处理，非规范化的sql思维，对于几百万文章和几百万评论的关联查询来讲，性能肯定不行，所以做宽表处理，从业务角度来说，文章发布以后不能随便修改标题和封面的',
  `article_cover` varchar(128) DEFAULT NULL COMMENT '文章封面',
  `comment_user_id` varchar(24) NOT NULL COMMENT '发布留言的用户id',
  `comment_user_nickname` varchar(16) NOT NULL COMMENT '冗余用户昵称，非一致性字段，用户修改昵称后可以不用同步',
  `comment_user_face` varchar(128) NOT NULL COMMENT '冗余的用户头像',
  `content` varchar(128) NOT NULL COMMENT '留言内容',
  `create_time` datetime NOT NULL COMMENT '留言时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章评论表';

-- ----------------------------
-- Records of comments
-- ----------------------------
BEGIN;
INSERT INTO `comments` VALUES ('200803ACAFBFSPPH', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', NULL, '200628AFYM7AGWPH', '我是慕课网', '', '<p>塔防32入让24入伏天</p>', '2020-08-03 14:38:11');
INSERT INTO `comments` VALUES ('200803AD739F28M8', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>123456</p>', '2020-08-03 14:40:29');
INSERT INTO `comments` VALUES ('200803AN327HGSRP', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>fgvrewfewewf</p>', '2020-08-03 14:58:04');
INSERT INTO `comments` VALUES ('200803AN3MF9SY80', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>g35g53g53</p>', '2020-08-03 14:58:08');
INSERT INTO `comments` VALUES ('200803AN3ZSATDKP', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>gbertgrew</p>', '2020-08-03 14:58:10');
INSERT INTO `comments` VALUES ('200803AN464BKZ54', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>g4tf43r</p>', '2020-08-03 14:58:12');
INSERT INTO `comments` VALUES ('200803AN4CH45XWH', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>g53g&nbsp;</p>', '2020-08-03 14:58:13');
INSERT INTO `comments` VALUES ('200803AN4W22DF3C', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>hbtegteg</p>', '2020-08-03 14:58:16');
INSERT INTO `comments` VALUES ('20080498DR0FSS14', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>测试评论展示</p>', '2020-08-04 13:02:07');
INSERT INTO `comments` VALUES ('20080498K7D3270H', '200628AFYM7AGWPH', '20080498DR0FSS14', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '这是回复的某条评论记录，123', '2020-08-04 13:02:30');
INSERT INTO `comments` VALUES ('20080498RW0C3HH0', '200628AFYM7AGWPH', '200803AN4CH45XWH', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', 'GV瑞特分隔符', '2020-08-04 13:02:59');
INSERT INTO `comments` VALUES ('200811C454KDY0DP', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>11122</p>', '2020-08-11 17:01:24');
INSERT INTO `comments` VALUES ('200811C4A9AHY614', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>rweqrewq</p>', '2020-08-11 17:01:57');
INSERT INTO `comments` VALUES ('200811C4B0ZC5680', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', '', '<p>rewr</p>', '2020-08-11 17:02:02');
INSERT INTO `comments` VALUES ('2008128T8YTCP9D4', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>带有头像留言</p>', '2020-08-12 12:22:34');
INSERT INTO `comments` VALUES ('2008128TCCWCW37C', '200628AFYM7AGWPH', '0', '2006117B57WRZGHH', 'SSI 网页内嵌技术', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/1001/2006117B534ND5YW.png', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>份份</p>', '2020-08-12 12:22:57');
INSERT INTO `comments` VALUES ('200812AATH3BK4ZC', '200628AFYM7AGWPH', '0', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>t43rt43y</p>', '2020-08-12 14:33:15');
INSERT INTO `comments` VALUES ('200812AAWD202WZC', '200628AFYM7AGWPH', '0', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>htehe</p>', '2020-08-12 14:33:20');
INSERT INTO `comments` VALUES ('200812AAWWMAK400', '200628AFYM7AGWPH', '200812AATH3BK4ZC', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', 'gregre', '2020-08-12 14:33:23');
INSERT INTO `comments` VALUES ('200812ACKZ0HSAY8', '200628AFYM7AGWPH', '0', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>沟通过</p>', '2020-08-12 14:38:39');
INSERT INTO `comments` VALUES ('200812ACMHTTB72W', '200628AFYM7AGWPH', '200812AATH3BK4ZC', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '图让她3 ', '2020-08-12 14:38:43');
INSERT INTO `comments` VALUES ('200812ACP42NGXP0', '200628AFYM7AGWPH', '200812ACMHTTB72W', '200812AARDT1M140', 't53ty35', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '44', '2020-08-12 14:38:53');
INSERT INTO `comments` VALUES ('2008138NY7XC6SNC', '200628AFYM7AGWPH', '0', '2008138M3K7YXHBC', '这是用来测试的HTML', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>侧黑色=非得哦啊软件叠加低偶家</p>', '2020-08-13 12:12:25');
INSERT INTO `comments` VALUES ('2008138NYWKZ1680', '200628AFYM7AGWPH', '2008138NY7XC6SNC', '2008138M3K7YXHBC', '这是用来测试的HTML', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '不托管人改3 ', '2020-08-13 12:12:29');
INSERT INTO `comments` VALUES ('2008138NZ6MYXG2W', '200628AFYM7AGWPH', '2008138NY7XC6SNC', '2008138M3K7YXHBC', '这是用来测试的HTML', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '法国人仿4 ', '2020-08-13 12:12:31');
INSERT INTO `comments` VALUES ('2008138P01DHPR68', '200628AFYM7AGWPH', '0', '2008138M3K7YXHBC', '这是用来测试的HTML', '', '200628AFYM7AGWPH', '我是慕课网', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '<p>32432图53&nbsp;</p>', '2020-08-13 12:12:36');
COMMIT;

-- ----------------------------
-- Table structure for fans
-- ----------------------------
DROP TABLE IF EXISTS `fans`;
CREATE TABLE `fans` (
  `id` varchar(24) NOT NULL,
  `writer_id` varchar(24) NOT NULL COMMENT '作家用户id',
  `fan_id` varchar(24) NOT NULL COMMENT '粉丝用户id',
  `face` varchar(128) DEFAULT NULL COMMENT '粉丝头像',
  `fan_nickname` varchar(16) NOT NULL COMMENT '粉丝昵称',
  `sex` int(11) NOT NULL COMMENT '粉丝性别',
  `province` varchar(16) NOT NULL COMMENT '省份',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `writer_id` (`writer_id`,`fan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='粉丝表，用户与粉丝的关联关系，粉丝本质也是用户。\n关联关系保存到es中，粉丝数方式和用户点赞收藏文章一样。累加累减都用redis来做。\n字段与用户表有些冗余，主要用于数据可视化，数据一旦有了之后，用户修改性别和省份无法影响此表，只认第一次的数据。\n\n';

-- ----------------------------
-- Records of fans
-- ----------------------------
BEGIN;
INSERT INTO `fans` VALUES ('2001026Z9WHRYZ04', '200628AFYM7AGWPH', '1004249T42N08Y34', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '浙江');
INSERT INTO `fans` VALUES ('2006026Z9WHRY1X1', '200628AFYM7AGWPH', '2004249T4218Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y51', 1, '北京');
INSERT INTO `fans` VALUES ('2006026Z9WHRY2X1', '200628AFYM7AGWPH', '2004249T4238Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y2', 1, '北京');
INSERT INTO `fans` VALUES ('2006026Z9WHRY3X1', '2004249T42NF8Y3C', '2004249T5Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y5433', 0, '北京');
INSERT INTO `fans` VALUES ('2006026Z9WHRY4X1', '200628AFYM7AGWPH', '20042462NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y44', 1, '北京');
INSERT INTO `fans` VALUES ('2006026Z9WHRY5X1', '2004249T42NF8Y3C', '2004247NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y55', 1, '北京');
INSERT INTO `fans` VALUES ('2006026Z9WHRY6X1', '200628AFYM7AGWPH', '2004842NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '上海');
INSERT INTO `fans` VALUES ('2006026Z9WHRY7X1', '200628AFYM7AGWPH', '20049T42NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户17', 0, '天津');
INSERT INTO `fans` VALUES ('2006026Z9WHRY8X1', '200628AFYM7AGWPH', '2004240F8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '上海');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ01', '200628AFYM7AGWPH', '2004249T42N08Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '天津');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ02', '200628AFYM7AGWPH', '2004249T42N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ03', '200628AFYM7AGWPH', '2004249T42N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ04', '200628AFYM7AGWPH', '2004249T42N08Y34', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ05', '200628AFYM7AGWPH', '2004249T42N08Y35', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ06', '200628AFYM7AGWPH', '2004249T42N08Y36', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ07', '200628AFYM7AGWPH', '2004249T42N08Y37', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ08', '200628AFYM7AGWPH', '2004249T42N08Y38', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ09', '200628AFYM7AGWPH', '2004249T42N08Y39', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ10', '200628AFYM7AGWPH', '2004249T42N08Y10', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江苏');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ11', '200628AFYM7AGWPH', '2004249T42NF813C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '天津');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ21', '200628AFYM7AGWPH', '2004249T42NF823C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '重庆');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ31', '200628AFYM7AGWPH', '2004249T42NF833C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '上海');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ41', '200628AFYM7AGWPH', '2004249T42NF843C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y566', 0, '重庆');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ51', '200628AFYM7AGWPH', '2004249T42NF853C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '重庆');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ61', '200628AFYM7AGWPH', '2004249T42NF863C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ71', '200628AFYM7AGWPH', '2004249T42NF873C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ81', '200628AFYM7AGWPH', '2004249T42NF883C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZ91', '200628AFYM7AGWPH', '2004249T42N93C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX0', '200628AFYM7AGWPH', '2004249T42NF8Y0C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX1', '200628AFYM7AGWPH', '2004249T42NF8Y1C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX2', '200628AFYM7AGWPH', '2004249T42NF8Y2C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '山西');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX3', '200628AFYM7AGWPH', '201T42NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y57', 0, '河北');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX4', '200628AFYM7AGWPH', '2004249T42NF8Y4C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '山西');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX5', '200628AFYM7AGWPH', '2004249T42NF8Y5C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '山西');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX6', '200628AFYM7AGWPH', '2004249T42NF8Y6C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '山西');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX7', '200628AFYM7AGWPH', '2004249T42NF8Y7C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '辽宁');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX8', '200628AFYM7AGWPH', '2004249T42NF8Y8C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y6', 1, '辽宁');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZX9', '2004249T42NF8Y3C', '2004249T42NF8Y9C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '吉林');
INSERT INTO `fans` VALUES ('2006026Z9WHRYZXP', '2004249T42NF8Y3C', '2004249T42NF8Y3C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 0, '黑龙江');
INSERT INTO `fans` VALUES ('2007308MZAK3AT9P', '200628AFYM7AGWPH', '200628AFYM7AGWPH', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '我是慕课网', 1, '北京');
INSERT INTO `fans` VALUES ('2007308TS7C9RXGC', '1001', '200628AFYM7AGWPH', 'https://imooc-news-dev.oss-cn-shanghai.aliyuncs.com/images/abc/200628AFYM7AGWPH/2007088XH2WT7GXP.png', '我是慕课网', 1, '北京');
INSERT INTO `fans` VALUES ('2011026Z9WHRYZ02', '2004249T42NF8Y3C', '1004249T42308Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '安徽');
INSERT INTO `fans` VALUES ('2011026Z9WHRYZ4', '2004249T42NF8Y3C', '1004249T42308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '福建');
INSERT INTO `fans` VALUES ('2021026Z9WHRYZ03', '2004249T42NF8Y3C', '1005249T45N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '安徽');
INSERT INTO `fans` VALUES ('2021026Z9WHRYZ5', '2004249T42NF8Y3C', '1005249T45N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '福建');
INSERT INTO `fans` VALUES ('2031026Z9WHRYZ04', '2004249T42NF8Y3C', '1006249T47N08Y34', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '安徽');
INSERT INTO `fans` VALUES ('2031026Z9WHRYZ6', '2004249T42NF8Y3C', '1006249T47N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '福建');
INSERT INTO `fans` VALUES ('207026Z9tHRr2', '2004249T42NF8Y3C', '1205249y5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '广东');
INSERT INTO `fans` VALUES ('207026Z9WHRr2', '2004249T42NF8Y3C', '1205249r5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '河南');
INSERT INTO `fans` VALUES ('207026Z9WHRY2', '2004249T42NF8Y3C', '120524935N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '山东');
INSERT INTO `fans` VALUES ('207026Z9WHRYZ5', '2004249T42NF8Y3C', '1205249T45N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江西');
INSERT INTO `fans` VALUES ('208026Z9tHRr3', '2004249T42NF8Y3C', '120624yT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '海南');
INSERT INTO `fans` VALUES ('208026Z9WHRr3', '2004249T42NF8Y3C', '120624rT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '湖北');
INSERT INTO `fans` VALUES ('208026Z9WHRY3', '2004249T42NF8Y3C', '1206249T4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '山东');
INSERT INTO `fans` VALUES ('208026Z9WHRYZ6', '2004249T42NF8Y3C', '1206249T47N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江西');
INSERT INTO `fans` VALUES ('209026Z9tHRr4', '2004249T42NF8Y3C', '12062yrT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '上海');
INSERT INTO `fans` VALUES ('209026Z9WHRr4', '2004249T42NF8Y3C', '120624rT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '湖南');
INSERT INTO `fans` VALUES ('209026Z9WHRY4', '2004249T42NF8Y3C', '1206249T6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '山东');
INSERT INTO `fans` VALUES ('20b026Z9tHRr2', '2004249T42NF8Y3C', '12052b9y5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '贵州');
INSERT INTO `fans` VALUES ('20b026Z9tHRr3', '2004249T42NF8Y3C', '1206b4yT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '云南');
INSERT INTO `fans` VALUES ('20b026Z9tHRr4', '2004249T42NF8Y3C', '12062brT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '陕西');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr2', '2004249T42NF8Y3C', '12052br9ty5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '内蒙古');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr2q', '2004249T42NF8Y3C', '120q52br9ty5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '宁夏');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr3', '2004249T42NF8Y3C', '1206b4rytT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '内蒙古');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr3q', '2004249T42NF8Y3C', '120q6b4rytT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '新疆');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr4', '2004249T42NF8Y3C', '12062rbrtT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '西藏');
INSERT INTO `fans` VALUES ('20br026Z9qtHRr4q', '2004249T42NF8Y3C', '1206q2rbrtT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '香港');
INSERT INTO `fans` VALUES ('20br026Z9tHRr2', '2004249T42NF8Y3C', '12052b9ty5N08Y32', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '甘肃');
INSERT INTO `fans` VALUES ('20br026Z9tHRr3', '2004249T42NF8Y3C', '1206b4ytT4N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '青海');
INSERT INTO `fans` VALUES ('20br026Z9tHRr4', '2004249T42NF8Y3C', '12062brtT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '台湾');
INSERT INTO `fans` VALUES ('20br026Zq9tHRr4', '2004249T42NF8Y3C', '120r62brtT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '广西');
INSERT INTO `fans` VALUES ('20br026Zq9tHRrq4', '2004249T42NF8Y3C', '120r62qbrtT6N08Y33', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 0, '澳门');
INSERT INTO `fans` VALUES ('21126Z9WHRYZX2', '2004249T42NF8Y3C', '2004249T4282C', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y54', 1, '黑龙江');
INSERT INTO `fans` VALUES ('261026Z9WHRr1', '2004249T42NF8Y3C', '12042414r308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '河南');
INSERT INTO `fans` VALUES ('261026Z9WHRY1', '2004249T42NF8Y3C', '120424142308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '山东');
INSERT INTO `fans` VALUES ('261026Z9WHRYZ4', '2004249T42NF8Y3C', '1204249T42308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '江西');
INSERT INTO `fans` VALUES ('261026Z9WtRr1', '2004249T42NF8Y3C', '1204241yr308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '广东');
INSERT INTO `fans` VALUES ('26b026Z9WtRr1', '2004249T42NF8Y3C', '12042b1yr308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '贵州');
INSERT INTO `fans` VALUES ('26br026Z9WqtRr1', '2004249T42NF8Y3C', '12042br1tyr308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '内蒙古');
INSERT INTO `fans` VALUES ('26br026Z9WqtRrq1', '2004249T42NF8Y3C', '12042br1tyqr308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '宁夏');
INSERT INTO `fans` VALUES ('26br026Z9WtRr1', '2004249T42NF8Y3C', '12042b1tyr308Y31', 'https://imooc-news.oss-cn-shanghai.aliyuncs.com/image/face/2004249T42NF8Y3C/2004249T42NF8Y3C.png', '用户1y56', 1, '甘肃');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
